Changeset 95373 in webkit


Ignore:
Timestamp:
Sep 16, 2011 11:52:28 PM (13 years ago)
Author:
abarth@webkit.org
Message:

Rename ENABLE(LEVELDB) to USE(LEVELDB)
https://bugs.webkit.org/show_bug.cgi?id=68290

Reviewed by Darin Adler.

Source/WebCore:

LEVELDB is a library that can be used to implemented INDEXED_DATABASE,
which means it should be a USE not an ENABLE.

  • CMakeLists.txt:
  • WebCore.gyp/WebCore.gyp:
  • platform/leveldb/LevelDBComparator.h:
  • platform/leveldb/LevelDBDatabase.cpp:
  • platform/leveldb/LevelDBDatabase.h:
  • platform/leveldb/LevelDBIterator.h:
  • platform/leveldb/LevelDBSlice.h:
  • platform/leveldb/LevelDBTransaction.cpp:
  • platform/leveldb/LevelDBTransaction.h:
  • platform/leveldb/LevelDBWriteBatch.cpp:
  • platform/leveldb/LevelDBWriteBatch.h:
  • storage/IDBFactoryBackendImpl.cpp:

(WebCore::IDBFactoryBackendImpl::open):
(WebCore::IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB):

  • storage/IDBLevelDBBackingStore.cpp:
  • storage/IDBLevelDBBackingStore.h:
  • storage/IDBLevelDBCoding.cpp:
  • storage/IDBLevelDBCoding.h:

Source/WebKit/chromium:

  • features.gypi:
  • tests/IDBLevelDBCodingTest.cpp:
Location:
trunk/Source
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r95372 r95373  
    14681468ENDIF ()
    14691469
    1470 IF (ENABLE_LEVELDB)
     1470IF (WTF_USE_LEVELDB)
    14711471    LIST(APPEND WebCore_SOURCES
    14721472        platform/leveldb/LevelDBDatabase.cpp
  • trunk/Source/WebCore/ChangeLog

    r95372 r95373  
     12011-09-16  Adam Barth  <abarth@webkit.org>
     2
     3        Rename ENABLE(LEVELDB) to USE(LEVELDB)
     4        https://bugs.webkit.org/show_bug.cgi?id=68290
     5
     6        Reviewed by Darin Adler.
     7
     8        LEVELDB is a library that can be used to implemented INDEXED_DATABASE,
     9        which means it should be a USE not an ENABLE.
     10
     11        * CMakeLists.txt:
     12        * WebCore.gyp/WebCore.gyp:
     13        * platform/leveldb/LevelDBComparator.h:
     14        * platform/leveldb/LevelDBDatabase.cpp:
     15        * platform/leveldb/LevelDBDatabase.h:
     16        * platform/leveldb/LevelDBIterator.h:
     17        * platform/leveldb/LevelDBSlice.h:
     18        * platform/leveldb/LevelDBTransaction.cpp:
     19        * platform/leveldb/LevelDBTransaction.h:
     20        * platform/leveldb/LevelDBWriteBatch.cpp:
     21        * platform/leveldb/LevelDBWriteBatch.h:
     22        * storage/IDBFactoryBackendImpl.cpp:
     23        (WebCore::IDBFactoryBackendImpl::open):
     24        (WebCore::IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB):
     25        * storage/IDBLevelDBBackingStore.cpp:
     26        * storage/IDBLevelDBBackingStore.h:
     27        * storage/IDBLevelDBCoding.cpp:
     28        * storage/IDBLevelDBCoding.h:
     29
    1302011-09-16  Andreas Kling  <kling@webkit.org>
    231
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r95356 r95373  
    12671267          ],
    12681268        }],
    1269         ['"ENABLE_LEVELDB=1" in feature_defines', {
     1269        ['"WTF_USE_LEVELDB=1" in feature_defines', {
    12701270          'dependencies': [
    12711271            '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
  • trunk/Source/WebCore/platform/leveldb/LevelDBComparator.h

    r84149 r95373  
    2727#define LevelDBComparator_h
    2828
    29 #if ENABLE(LEVELDB)
     29#if USE(LEVELDB)
    3030
    3131#include <wtf/text/WTFString.h>
     
    4545} // namespace WebCore
    4646
    47 #endif // ENABLE(LEVELDB)
     47#endif // USE(LEVELDB)
     48
    4849#endif // LevelDBComparator_h
  • trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp

    r91721 r95373  
    2727#include "LevelDBDatabase.h"
    2828
    29 #if ENABLE(LEVELDB)
     29#if USE(LEVELDB)
    3030
    3131#include "LevelDBComparator.h"
  • trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.h

    r87370 r95373  
    2727#define LevelDBDatabase_h
    2828
    29 #if ENABLE(LEVELDB)
     29#if USE(LEVELDB)
    3030
    3131#include <wtf/OwnPtr.h>
  • trunk/Source/WebCore/platform/leveldb/LevelDBIterator.h

    r87370 r95373  
    2727#define LevelDBIterator_h
    2828
    29 #if ENABLE(LEVELDB)
     29#if USE(LEVELDB)
    3030
    3131#include "LevelDBSlice.h"
     
    4747} // namespace WebCore
    4848
    49 #endif // ENABLE(LEVELDB)
     49#endif // USE(LEVELDB)
     50
    5051#endif // LevelDBIterator_h
  • trunk/Source/WebCore/platform/leveldb/LevelDBSlice.h

    r84149 r95373  
    2727#define LevelDBSlice_h
    2828
    29 #if ENABLE(LEVELDB)
     29#if USE(LEVELDB)
    3030
    3131#include "PlatformString.h"
     
    6464} // namespace WebCore
    6565
    66 #endif // ENABLE(LEVELDB)
     66#endif // USE(LEVELDB)
     67
    6768#endif // LevelDBSlice_h
  • trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp

    r87911 r95373  
    3232
    3333#if ENABLE(INDEXED_DATABASE)
    34 #if ENABLE(LEVELDB)
     34#if USE(LEVELDB)
    3535
    3636namespace WebCore {
     
    477477} // namespace WebCore
    478478
    479 #endif // ENABLE(LEVELDB)
     479#endif // USE(LEVELDB)
    480480#endif // ENABLE(INDEXED_DATABASE)
  • trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.h

    r87508 r95373  
    2828
    2929#if ENABLE(INDEXED_DATABASE)
    30 #if ENABLE(LEVELDB)
     30#if USE(LEVELDB)
    3131
    3232#include "LevelDBComparator.h"
     
    170170}
    171171
    172 #endif // ENABLE(LEVELDB)
     172#endif // USE(LEVELDB)
    173173#endif // ENABLE(INDEXED_DATABASE)
    174174
  • trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.cpp

    r87370 r95373  
    2727#include "LevelDBWriteBatch.h"
    2828
    29 #if ENABLE(LEVELDB)
     29#if USE(LEVELDB)
    3030
    3131#include "LevelDBSlice.h"
  • trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.h

    r87370 r95373  
    2727#define LevelDBWriteBatch_h
    2828
    29 #if ENABLE(LEVELDB)
     29#if USE(LEVELDB)
    3030
    3131#include <wtf/OwnPtr.h>
     
    6060}
    6161
    62 #endif // ENABLE(LEVELDB)
     62#endif // USE(LEVELDB)
     63
    6364#endif // LevelDBWriteBatch_h
  • trunk/Source/WebCore/storage/IDBFactoryBackendImpl.cpp

    r90137 r95373  
    9797    // FIXME: Everything from now on should be done on another thread.
    9898
    99 #if ENABLE(LEVELDB)
     99#if USE(LEVELDB)
    100100    if (backingStoreType == LevelDBBackingStore) {
    101101        bool hasSQLBackingStore = IDBSQLiteBackingStore::backingStoreExists(securityOrigin.get(), name, dataDir);
     
    120120        if (backingStoreType == SQLiteBackingStore)
    121121            backingStore = IDBSQLiteBackingStore::open(securityOrigin.get(), dataDir, maximumSize, fileIdentifier, this);
    122 #if ENABLE(LEVELDB)
     122#if USE(LEVELDB)
    123123        else if (backingStoreType == LevelDBBackingStore)
    124124            backingStore = IDBLevelDBBackingStore::open(securityOrigin.get(), dataDir, maximumSize, fileIdentifier, this);
     
    135135}
    136136
    137 #if ENABLE(LEVELDB)
     137#if USE(LEVELDB)
    138138
    139139static bool migrateObjectStores(PassRefPtr<IDBBackingStore> fromBackingStore, int64_t fromDatabaseId, PassRefPtr<IDBBackingStore> toBackingStore, int64_t toDatabaseId)
     
    194194    return true;
    195195}
    196 #endif // #if ENABLE(LEVELDB)
     196#endif // #if USE(LEVELDB)
    197197
    198198bool IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB(const String& name, SecurityOrigin* securityOrigin, const String& dataDir, int64_t maximumSize)
    199199{
    200 #if ENABLE(LEVELDB)
     200#if USE(LEVELDB)
    201201    String fromUniqueIdentifier = computeUniqueIdentifier(name, securityOrigin, SQLiteBackingStore);
    202202    String fromFileIdentifier = computeFileIdentifier(securityOrigin, SQLiteBackingStore);
     
    254254    return migrateObjectStores(fromBackingStore, fromDatabaseBackend->id(), toBackingStore, toDatabaseId);
    255255
    256 #endif // ENABLE(LEVELDB)
     256#endif // USE(LEVELDB)
    257257    return false;
    258258}
  • trunk/Source/WebCore/storage/IDBLevelDBBackingStore.cpp

    r92950 r95373  
    2828
    2929#if ENABLE(INDEXED_DATABASE)
    30 #if ENABLE(LEVELDB)
     30#if USE(LEVELDB)
    3131
    3232#include "Assertions.h"
     
    13111311} // namespace WebCore
    13121312
    1313 #endif // ENABLE(LEVELDB)
     1313#endif // USE(LEVELDB)
    13141314#endif // ENABLE(INDEXED_DATABASE)
  • trunk/Source/WebCore/storage/IDBLevelDBBackingStore.h

    r92950 r95373  
    2828
    2929#if ENABLE(INDEXED_DATABASE)
    30 #if ENABLE(LEVELDB)
     30#if USE(LEVELDB)
    3131
    3232#include "IDBBackingStore.h"
     
    104104
    105105
    106 #endif // ENABLE(LEVELDB)
     106#endif // USE(LEVELDB)
    107107#endif // ENABLE(INDEXED_DATABASE)
    108108
  • trunk/Source/WebCore/storage/IDBLevelDBCoding.cpp

    r94640 r95373  
    2828
    2929#if ENABLE(INDEXED_DATABASE)
    30 #if ENABLE(LEVELDB)
     30#if USE(LEVELDB)
    3131
    3232#include "IDBKey.h"
     
    13141314} // namespace WebCore
    13151315
    1316 #endif // ENABLE(LEVELDB)
     1316#endif // USE(LEVELDB)
    13171317#endif // ENABLE(INDEXED_DATABASE)
  • trunk/Source/WebCore/storage/IDBLevelDBCoding.h

    r88019 r95373  
    2828
    2929#if ENABLE(INDEXED_DATABASE)
    30 #if ENABLE(LEVELDB)
     30#if USE(LEVELDB)
    3131
    3232#include <wtf/RefPtr.h>
     
    278278} // namespace WebCore
    279279
    280 #endif // ENABLE(LEVELDB)
     280#endif // USE(LEVELDB)
    281281#endif // ENABLE(INDEXED_DATABASE)
    282282
  • trunk/Source/WebKit/chromium/ChangeLog

    r95369 r95373  
     12011-09-16  Adam Barth  <abarth@webkit.org>
     2
     3        Rename ENABLE(LEVELDB) to USE(LEVELDB)
     4        https://bugs.webkit.org/show_bug.cgi?id=68290
     5
     6        Reviewed by Darin Adler.
     7
     8        * features.gypi:
     9        * tests/IDBLevelDBCodingTest.cpp:
     10
    1112011-09-16  Jochen Eisinger  <jochen@chromium.org>
    212
  • trunk/Source/WebKit/chromium/features.gypi

    r95272 r95373  
    5858      'ENABLE_JAVASCRIPT_I18N_API=1',
    5959      'ENABLE_JSC_MULTIPLE_THREADS=0',
    60       'ENABLE_LEVELDB=1',
    6160      'ENABLE_LINK_PREFETCH=1',
    6261      'ENABLE_MEDIA_STATISTICS=1',
     
    9190      'ENABLE_XPATH=1',
    9291      'ENABLE_XSLT=1',
     92      'WTF_USE_LEVELDB=1',
    9393      'WTF_USE_BUILTIN_UTF8_CODEC=1',
    9494      # WTF_USE_DYNAMIC_ANNOTATIONS=1 may be defined in build/common.gypi
  • trunk/Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp

    r88019 r95373  
    2828
    2929#if ENABLE(INDEXED_DATABASE)
    30 #if ENABLE(LEVELDB)
     30#if USE(LEVELDB)
    3131
    3232#include "IDBKey.h"
     
    388388} // namespace
    389389
    390 #endif // ENABLE(LEVELDB)
     390#endif // USE(LEVELDB)
    391391#endif // ENABLE(INDEXED_DATABASE)
Note: See TracChangeset for help on using the changeset viewer.