Title: [95373] trunk/Source
Revision
95373
Author
[email protected]
Date
2011-09-16 23:52:28 -0700 (Fri, 16 Sep 2011)

Log 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (95372 => 95373)


--- trunk/Source/WebCore/CMakeLists.txt	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/CMakeLists.txt	2011-09-17 06:52:28 UTC (rev 95373)
@@ -1467,7 +1467,7 @@
     )
 ENDIF ()
 
-IF (ENABLE_LEVELDB)
+IF (WTF_USE_LEVELDB)
     LIST(APPEND WebCore_SOURCES
         platform/leveldb/LevelDBDatabase.cpp
         platform/leveldb/LevelDBTransaction.cpp

Modified: trunk/Source/WebCore/ChangeLog (95372 => 95373)


--- trunk/Source/WebCore/ChangeLog	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/ChangeLog	2011-09-17 06:52:28 UTC (rev 95373)
@@ -1,3 +1,32 @@
+2011-09-16  Adam Barth  <[email protected]>
+
+        Rename ENABLE(LEVELDB) to USE(LEVELDB)
+        https://bugs.webkit.org/show_bug.cgi?id=68290
+
+        Reviewed by Darin Adler.
+
+        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:
+
 2011-09-16  Andreas Kling  <[email protected]>
 
         Reduce EventTarget memory usage by deferring hash map allocation

Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (95372 => 95373)


--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -1266,7 +1266,7 @@
             '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
           ],
         }],
-        ['"ENABLE_LEVELDB=1" in feature_defines', {
+        ['"WTF_USE_LEVELDB=1" in feature_defines', {
           'dependencies': [
             '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
           ],

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBComparator.h (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBComparator.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBComparator.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -26,7 +26,7 @@
 #ifndef LevelDBComparator_h
 #define LevelDBComparator_h
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include <wtf/text/WTFString.h>
 
@@ -44,5 +44,6 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
+
 #endif // LevelDBComparator_h

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "LevelDBDatabase.h"
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "LevelDBComparator.h"
 #include "LevelDBIterator.h"

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.h (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -26,7 +26,7 @@
 #ifndef LevelDBDatabase_h
 #define LevelDBDatabase_h
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBIterator.h (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBIterator.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBIterator.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -26,7 +26,7 @@
 #ifndef LevelDBIterator_h
 #define LevelDBIterator_h
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "LevelDBSlice.h"
 
@@ -46,5 +46,6 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
+
 #endif // LevelDBIterator_h

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBSlice.h (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBSlice.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBSlice.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -26,7 +26,7 @@
 #ifndef LevelDBSlice_h
 #define LevelDBSlice_h
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "PlatformString.h"
 #include <Vector.h>
@@ -63,5 +63,6 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
+
 #endif // LevelDBSlice_h

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -31,7 +31,7 @@
 #include "LevelDBWriteBatch.h"
 
 #if ENABLE(INDEXED_DATABASE)
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 namespace WebCore {
 
@@ -476,5 +476,5 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
 #endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.h (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBTransaction.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -27,7 +27,7 @@
 #define LevelDBTransaction_h
 
 #if ENABLE(INDEXED_DATABASE)
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "LevelDBComparator.h"
 #include "LevelDBIterator.h"
@@ -169,7 +169,7 @@
 
 }
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
 #endif // ENABLE(INDEXED_DATABASE)
 
 #endif // LevelDBTransaction_h

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.cpp (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.cpp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.cpp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "LevelDBWriteBatch.h"
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "LevelDBSlice.h"
 #include <leveldb/slice.h>

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.h (95372 => 95373)


--- trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBWriteBatch.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -26,7 +26,7 @@
 #ifndef LevelDBWriteBatch_h
 #define LevelDBWriteBatch_h
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
@@ -59,5 +59,6 @@
 
 }
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
+
 #endif // LevelDBWriteBatch_h

Modified: trunk/Source/WebCore/storage/IDBFactoryBackendImpl.cpp (95372 => 95373)


--- trunk/Source/WebCore/storage/IDBFactoryBackendImpl.cpp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/storage/IDBFactoryBackendImpl.cpp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -96,7 +96,7 @@
 
     // FIXME: Everything from now on should be done on another thread.
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
     if (backingStoreType == LevelDBBackingStore) {
         bool hasSQLBackingStore = IDBSQLiteBackingStore::backingStoreExists(securityOrigin.get(), name, dataDir);
 
@@ -119,7 +119,7 @@
     else {
         if (backingStoreType == SQLiteBackingStore)
             backingStore = IDBSQLiteBackingStore::open(securityOrigin.get(), dataDir, maximumSize, fileIdentifier, this);
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
         else if (backingStoreType == LevelDBBackingStore)
             backingStore = IDBLevelDBBackingStore::open(securityOrigin.get(), dataDir, maximumSize, fileIdentifier, this);
 #endif
@@ -134,7 +134,7 @@
     m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
 }
 
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 static bool migrateObjectStores(PassRefPtr<IDBBackingStore> fromBackingStore, int64_t fromDatabaseId, PassRefPtr<IDBBackingStore> toBackingStore, int64_t toDatabaseId)
 {
@@ -193,11 +193,11 @@
 
     return true;
 }
-#endif // #if ENABLE(LEVELDB)
+#endif // #if USE(LEVELDB)
 
 bool IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB(const String& name, SecurityOrigin* securityOrigin, const String& dataDir, int64_t maximumSize)
 {
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
     String fromUniqueIdentifier = computeUniqueIdentifier(name, securityOrigin, SQLiteBackingStore);
     String fromFileIdentifier = computeFileIdentifier(securityOrigin, SQLiteBackingStore);
     String toUniqueIdentifier = computeUniqueIdentifier(name, securityOrigin, LevelDBBackingStore);
@@ -253,7 +253,7 @@
 
     return migrateObjectStores(fromBackingStore, fromDatabaseBackend->id(), toBackingStore, toDatabaseId);
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
     return false;
 }
 

Modified: trunk/Source/WebCore/storage/IDBLevelDBBackingStore.cpp (95372 => 95373)


--- trunk/Source/WebCore/storage/IDBLevelDBBackingStore.cpp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/storage/IDBLevelDBBackingStore.cpp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -27,7 +27,7 @@
 #include "IDBLevelDBBackingStore.h"
 
 #if ENABLE(INDEXED_DATABASE)
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "Assertions.h"
 #include "FileSystem.h"
@@ -1310,5 +1310,5 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
 #endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebCore/storage/IDBLevelDBBackingStore.h (95372 => 95373)


--- trunk/Source/WebCore/storage/IDBLevelDBBackingStore.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/storage/IDBLevelDBBackingStore.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -27,7 +27,7 @@
 #define IDBLevelDBBackingStore_h
 
 #if ENABLE(INDEXED_DATABASE)
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "IDBBackingStore.h"
 #include <wtf/OwnPtr.h>
@@ -103,7 +103,7 @@
 } // namespace WebCore
 
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
 #endif // ENABLE(INDEXED_DATABASE)
 
 #endif // IDBLevelDBBackingStore_h

Modified: trunk/Source/WebCore/storage/IDBLevelDBCoding.cpp (95372 => 95373)


--- trunk/Source/WebCore/storage/IDBLevelDBCoding.cpp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/storage/IDBLevelDBCoding.cpp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -27,7 +27,7 @@
 #include "IDBLevelDBCoding.h"
 
 #if ENABLE(INDEXED_DATABASE)
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "IDBKey.h"
 #include "LevelDBSlice.h"
@@ -1313,5 +1313,5 @@
 } // namespace IDBLevelDBCoding
 } // namespace WebCore
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
 #endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebCore/storage/IDBLevelDBCoding.h (95372 => 95373)


--- trunk/Source/WebCore/storage/IDBLevelDBCoding.h	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebCore/storage/IDBLevelDBCoding.h	2011-09-17 06:52:28 UTC (rev 95373)
@@ -27,7 +27,7 @@
 #define IDBLevelDBCoding_h
 
 #if ENABLE(INDEXED_DATABASE)
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
@@ -277,7 +277,7 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
 #endif // ENABLE(INDEXED_DATABASE)
 
 #endif // IDBLevelDBCoding_h

Modified: trunk/Source/WebKit/chromium/ChangeLog (95372 => 95373)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-09-17 06:52:28 UTC (rev 95373)
@@ -1,3 +1,13 @@
+2011-09-16  Adam Barth  <[email protected]>
+
+        Rename ENABLE(LEVELDB) to USE(LEVELDB)
+        https://bugs.webkit.org/show_bug.cgi?id=68290
+
+        Reviewed by Darin Adler.
+
+        * features.gypi:
+        * tests/IDBLevelDBCodingTest.cpp:
+
 2011-09-16  Jochen Eisinger  <[email protected]>
 
         Rename FrameLoaderClient::allowImages to FrameLoaderClient::allowImage and include the image URL as parameter

Modified: trunk/Source/WebKit/chromium/features.gypi (95372 => 95373)


--- trunk/Source/WebKit/chromium/features.gypi	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebKit/chromium/features.gypi	2011-09-17 06:52:28 UTC (rev 95373)
@@ -57,7 +57,6 @@
       'ENABLE_JAVASCRIPT_DEBUGGER=1',
       'ENABLE_JAVASCRIPT_I18N_API=1',
       'ENABLE_JSC_MULTIPLE_THREADS=0',
-      'ENABLE_LEVELDB=1',
       'ENABLE_LINK_PREFETCH=1',
       'ENABLE_MEDIA_STATISTICS=1',
       'ENABLE_MEDIA_STREAM=1',
@@ -90,6 +89,7 @@
       'ENABLE_XHR_RESPONSE_BLOB=1',
       'ENABLE_XPATH=1',
       'ENABLE_XSLT=1',
+      'WTF_USE_LEVELDB=1',
       'WTF_USE_BUILTIN_UTF8_CODEC=1',
       # WTF_USE_DYNAMIC_ANNOTATIONS=1 may be defined in build/common.gypi
       # We can't define it here because it should be present only

Modified: trunk/Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp (95372 => 95373)


--- trunk/Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp	2011-09-17 06:34:05 UTC (rev 95372)
+++ trunk/Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp	2011-09-17 06:52:28 UTC (rev 95373)
@@ -27,7 +27,7 @@
 #include "IDBLevelDBCoding.h"
 
 #if ENABLE(INDEXED_DATABASE)
-#if ENABLE(LEVELDB)
+#if USE(LEVELDB)
 
 #include "IDBKey.h"
 #include "LevelDBSlice.h"
@@ -387,5 +387,5 @@
 
 } // namespace
 
-#endif // ENABLE(LEVELDB)
+#endif // USE(LEVELDB)
 #endif // ENABLE(INDEXED_DATABASE)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to