diff options
author | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-26 13:13:53 +0000 |
---|---|---|
committer | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-26 13:13:53 +0000 |
commit | 8eadc8bbf1f3c89b494150b32109e14c1ef964db (patch) | |
tree | f6a48b136b99318e1b30da612c36e6084851b94e /webkit | |
parent | 8540c5f3aaf61f18b41cf5304f5174c7a3ebd7af (diff) | |
download | chromium_src-8eadc8bbf1f3c89b494150b32109e14c1ef964db.zip chromium_src-8eadc8bbf1f3c89b494150b32109e14c1ef964db.tar.gz chromium_src-8eadc8bbf1f3c89b494150b32109e14c1ef964db.tar.bz2 |
webkit: Merge 'database' and 'quota' to 'webkit_storage'
Remove webkit/database/quota_table* since it's not used.
Merge 'database' and 'quota' to 'webkit_storage'.
Add WEBKIT_STORAGE_EXPORT(_PRIVATE) when necessary.
BUG=155242
TEST=build
TBR=jam@chromium.org for trivial gyp changes
Review URL: https://chromiumcodereview.appspot.com/11274003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/database/database_connections.h | 5 | ||||
-rw-r--r-- | webkit/database/database_quota_client.h | 4 | ||||
-rw-r--r-- | webkit/database/database_tracker.h | 10 | ||||
-rw-r--r-- | webkit/database/database_util.h | 3 | ||||
-rw-r--r-- | webkit/database/databases_table.h | 5 | ||||
-rw-r--r-- | webkit/database/quota_table.cc | 55 | ||||
-rw-r--r-- | webkit/database/quota_table.h | 31 | ||||
-rw-r--r-- | webkit/database/quota_table_unittest.cc | 71 | ||||
-rw-r--r-- | webkit/database/vfs_backend.h | 3 | ||||
-rw-r--r-- | webkit/database/webkit_database.gypi | 53 | ||||
-rw-r--r-- | webkit/quota/quota_client.h | 3 | ||||
-rw-r--r-- | webkit/quota/quota_database.h | 15 | ||||
-rw-r--r-- | webkit/quota/quota_manager.h | 14 | ||||
-rw-r--r-- | webkit/quota/quota_task.h | 3 | ||||
-rw-r--r-- | webkit/quota/quota_temporary_storage_evictor.h | 4 | ||||
-rw-r--r-- | webkit/quota/special_storage_policy.h | 3 | ||||
-rw-r--r-- | webkit/quota/webkit_quota.gypi | 54 | ||||
-rw-r--r-- | webkit/storage/webkit_storage.gypi | 7 | ||||
-rw-r--r-- | webkit/support/webkit_support.gypi | 1 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.gypi | 2 |
20 files changed, 82 insertions, 264 deletions
diff --git a/webkit/database/database_connections.h b/webkit/database/database_connections.h index 8f956ac..f49cb79 100644 --- a/webkit/database/database_connections.h +++ b/webkit/database/database_connections.h @@ -11,6 +11,7 @@ #include "base/memory/ref_counted.h" #include "base/string16.h" #include "base/synchronization/lock.h" +#include "webkit/storage/webkit_storage_export.h" namespace base { class MessageLoopProxy; @@ -18,7 +19,7 @@ class MessageLoopProxy; namespace webkit_database { -class DatabaseConnections { +class WEBKIT_STORAGE_EXPORT DatabaseConnections { public: DatabaseConnections(); ~DatabaseConnections(); @@ -67,7 +68,7 @@ class DatabaseConnections { // A wrapper class that provides thread-safety and the // ability to wait until all connections have closed. // Intended for use in renderer processes. -class DatabaseConnectionsWrapper +class WEBKIT_STORAGE_EXPORT DatabaseConnectionsWrapper : public base::RefCountedThreadSafe<DatabaseConnectionsWrapper> { public: DatabaseConnectionsWrapper(); diff --git a/webkit/database/database_quota_client.h b/webkit/database/database_quota_client.h index f3a613e..2c14e1d 100644 --- a/webkit/database/database_quota_client.h +++ b/webkit/database/database_quota_client.h @@ -12,6 +12,7 @@ #include "base/message_loop_proxy.h" #include "webkit/quota/quota_client.h" #include "webkit/quota/quota_types.h" +#include "webkit/storage/webkit_storage_export.h" namespace webkit_database { @@ -20,7 +21,8 @@ class DatabaseTracker; // A QuotaClient implementation to integrate WebSQLDatabases // with the quota management system. This interface is used // on the IO thread by the quota manager. -class DatabaseQuotaClient : public quota::QuotaClient { +class WEBKIT_STORAGE_EXPORT_PRIVATE DatabaseQuotaClient + : public quota::QuotaClient { public: DatabaseQuotaClient( base::MessageLoopProxy* tracker_thread, diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h index 9c1ef04..df3079a 100644 --- a/webkit/database/database_tracker.h +++ b/webkit/database/database_tracker.h @@ -20,6 +20,7 @@ #include "base/time.h" #include "net/base/completion_callback.h" #include "webkit/database/database_connections.h" +#include "webkit/storage/webkit_storage_export.h" namespace base { class MessageLoopProxy; @@ -37,13 +38,14 @@ class SpecialStoragePolicy; namespace webkit_database { -extern const FilePath::CharType kDatabaseDirectoryName[]; -extern const FilePath::CharType kTrackerDatabaseFileName[]; +WEBKIT_STORAGE_EXPORT extern const FilePath::CharType kDatabaseDirectoryName[]; +WEBKIT_STORAGE_EXPORT extern const FilePath::CharType + kTrackerDatabaseFileName[]; class DatabasesTable; // This class is used to store information about all databases in an origin. -class OriginInfo { +class WEBKIT_STORAGE_EXPORT OriginInfo { public: OriginInfo(); OriginInfo(const OriginInfo& origin_info); @@ -75,7 +77,7 @@ class OriginInfo { // the disk. Therefore, in a multi-threaded application, all methods of this // class should be called on the thread dedicated to file operations (file // thread in the browser process, for example), if such a thread exists. -class DatabaseTracker +class WEBKIT_STORAGE_EXPORT DatabaseTracker : public base::RefCountedThreadSafe<DatabaseTracker> { public: class Observer { diff --git a/webkit/database/database_util.h b/webkit/database/database_util.h index cbc13da..67296b3 100644 --- a/webkit/database/database_util.h +++ b/webkit/database/database_util.h @@ -7,6 +7,7 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" +#include "webkit/storage/webkit_storage_export.h" class FilePath; @@ -14,7 +15,7 @@ namespace webkit_database { class DatabaseTracker; -class DatabaseUtil { +class WEBKIT_STORAGE_EXPORT DatabaseUtil { public: static const char kJournalFileSuffix[]; diff --git a/webkit/database/databases_table.h b/webkit/database/databases_table.h index 4caab805..d7a2581 100644 --- a/webkit/database/databases_table.h +++ b/webkit/database/databases_table.h @@ -8,6 +8,7 @@ #include <vector> #include "base/string16.h" +#include "webkit/storage/webkit_storage_export.h" namespace sql { class Connection; @@ -15,7 +16,7 @@ class Connection; namespace webkit_database { -struct DatabaseDetails { +struct WEBKIT_STORAGE_EXPORT_PRIVATE DatabaseDetails { DatabaseDetails(); ~DatabaseDetails(); @@ -25,7 +26,7 @@ struct DatabaseDetails { int64 estimated_size; }; -class DatabasesTable { +class WEBKIT_STORAGE_EXPORT_PRIVATE DatabasesTable { public: explicit DatabasesTable(sql::Connection* db) : db_(db) { } diff --git a/webkit/database/quota_table.cc b/webkit/database/quota_table.cc deleted file mode 100644 index 9f49200..0000000 --- a/webkit/database/quota_table.cc +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "webkit/database/quota_table.h" - -#include "base/logging.h" -#include "base/utf_string_conversions.h" -#include "sql/statement.h" - -namespace webkit_database { - -bool QuotaTable::Init() { - // 'Quota' schema: - // origin The origin. - // quota The quota for this origin. - return db_->DoesTableExist("Quota") || - db_->Execute( - "CREATE TABLE Quota (" - "origin TEXT NOT NULL PRIMARY KEY, " - "quota INTEGER NOT NULL)"); -} - -int64 QuotaTable::GetOriginQuota(const string16& origin_identifier) { - sql::Statement statement(db_->GetCachedStatement( - SQL_FROM_HERE, "SELECT quota FROM Quota WHERE origin = ?")); - statement.BindString16(0, origin_identifier); - if (statement.Step()) { - return statement.ColumnInt64(0); - } - - return -1; -} - -bool QuotaTable::SetOriginQuota(const string16& origin_identifier, - int64 quota) { - DCHECK(quota >= 0); - - // Insert or update the quota for this origin. - sql::Statement replace_statement(db_->GetCachedStatement( - SQL_FROM_HERE, "REPLACE INTO Quota VALUES (?, ?)")); - replace_statement.BindString16(0, origin_identifier); - replace_statement.BindInt64(1, quota); - return replace_statement.Run(); -} - -bool QuotaTable::ClearOriginQuota(const string16& origin_identifier) { - sql::Statement statement(db_->GetCachedStatement( - SQL_FROM_HERE, "DELETE FROM Quota WHERE origin = ?")); - statement.BindString16(0, origin_identifier); - - return (statement.Run() && db_->GetLastChangeCount()); -} - -} // namespace webkit_database diff --git a/webkit/database/quota_table.h b/webkit/database/quota_table.h deleted file mode 100644 index 3246363..0000000 --- a/webkit/database/quota_table.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_DATABASE_QUOTA_TABLE_H_ -#define WEBKIT_DATABASE_QUOTA_TABLE_H_ - -#include "base/string16.h" - -namespace sql { -class Connection; -} - -namespace webkit_database { - -class QuotaTable { - public: - explicit QuotaTable(sql::Connection* db) : db_(db) { } - - bool Init(); - int64 GetOriginQuota(const string16& origin_identifier); - bool SetOriginQuota(const string16& origin_identifier, int64 quota); - bool ClearOriginQuota(const string16& origin_identifier); - - private: - sql::Connection* db_; -}; - -} // namespace webkit_database - -#endif // WEBKIT_DATABASE_QUOTA_TABLE_H_ diff --git a/webkit/database/quota_table_unittest.cc b/webkit/database/quota_table_unittest.cc deleted file mode 100644 index 7d4814a..0000000 --- a/webkit/database/quota_table_unittest.cc +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/string_util.h" -#include "base/utf_string_conversions.h" -#include "sql/connection.h" -#include "sql/statement.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "webkit/database/quota_table.h" - -namespace { - -class TestErrorDelegate : public sql::ErrorDelegate { - public: - TestErrorDelegate() {} - virtual ~TestErrorDelegate() {} - - virtual int OnError(int error, - sql::Connection* connection, - sql::Statement* stmt) OVERRIDE { - return error; - } - - private: - DISALLOW_COPY_AND_ASSIGN(TestErrorDelegate); -}; - -} // namespace - -namespace webkit_database { - -static bool QuotaTableIsEmpty(sql::Connection* db) { - sql::Statement statement(db->GetCachedStatement( - SQL_FROM_HERE, "SELECT COUNT(*) FROM Quota")); - return (statement.is_valid() && statement.Step() && !statement.ColumnInt(0)); -} - -TEST(QuotaTableTest, TestIt) { - // Initialize the 'Quota' table. - sql::Connection db; - - // Set an error delegate that will make all operations return false on error. - db.set_error_delegate(new TestErrorDelegate()); - - // Initialize the temp dir and the 'Databases' table. - EXPECT_TRUE(db.OpenInMemory()); - QuotaTable quota_table(&db); - EXPECT_TRUE(quota_table.Init()); - - // The 'Quota' table should be empty. - EXPECT_TRUE(QuotaTableIsEmpty(&db)); - - // Set and check the quota for a new origin. - string16 origin = ASCIIToUTF16("origin"); - EXPECT_TRUE(quota_table.SetOriginQuota(origin, 1000)); - EXPECT_EQ(1000, quota_table.GetOriginQuota(origin)); - - // Reset and check the quota for the same origin. - EXPECT_TRUE(quota_table.SetOriginQuota(origin, 2000)); - EXPECT_EQ(2000, quota_table.GetOriginQuota(origin)); - - // Clear the quota for an origin - EXPECT_TRUE(quota_table.ClearOriginQuota(origin)); - EXPECT_TRUE(quota_table.GetOriginQuota(origin) < 0); - - // Check that there's no quota set for unknown origins. - EXPECT_TRUE(quota_table.GetOriginQuota(ASCIIToUTF16("unknown_origin")) < 0); -} - -} // namespace webkit_database diff --git a/webkit/database/vfs_backend.h b/webkit/database/vfs_backend.h index c7a6280..8fba3fa 100644 --- a/webkit/database/vfs_backend.h +++ b/webkit/database/vfs_backend.h @@ -8,12 +8,13 @@ #include "base/platform_file.h" #include "base/process.h" #include "base/string16.h" +#include "webkit/storage/webkit_storage_export.h" class FilePath; namespace webkit_database { -class VfsBackend { +class WEBKIT_STORAGE_EXPORT VfsBackend { public: static void OpenFile(const FilePath& file_path, int desired_flags, diff --git a/webkit/database/webkit_database.gypi b/webkit/database/webkit_database.gypi index 7473f86..dde3c09 100644 --- a/webkit/database/webkit_database.gypi +++ b/webkit/database/webkit_database.gypi @@ -3,41 +3,20 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'database', - 'type': 'static_library', - 'variables': { 'enable_wexit_time_destructors': 1, }, - 'dependencies': [ - '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/sql/sql.gyp:sql', - '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', - '<(DEPTH)/webkit/support/webkit_support.gyp:quota', - '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit', - ], - 'sources': [ - 'databases_table.cc', - 'databases_table.h', - 'database_connections.cc', - 'database_connections.h', - 'database_quota_client.cc', - 'database_quota_client.h', - 'database_tracker.cc', - 'database_tracker.h', - 'database_util.cc', - 'database_util.h', - 'quota_table.cc', - 'quota_table.h', - 'vfs_backend.cc', - 'vfs_backend.h', - ], - 'conditions': [ - ['inside_chromium_build==0', { - 'dependencies': [ - '<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers', - ], - }], - ], - }, - ], + 'variables': { + 'webkit_database_sources': [ + '../database/databases_table.cc', + '../database/databases_table.h', + '../database/database_connections.cc', + '../database/database_connections.h', + '../database/database_quota_client.cc', + '../database/database_quota_client.h', + '../database/database_tracker.cc', + '../database/database_tracker.h', + '../database/database_util.cc', + '../database/database_util.h', + '../database/vfs_backend.cc', + '../database/vfs_backend.h', + ], + }, } diff --git a/webkit/quota/quota_client.h b/webkit/quota/quota_client.h index e74ffb3..88a5ddf 100644 --- a/webkit/quota/quota_client.h +++ b/webkit/quota/quota_client.h @@ -12,6 +12,7 @@ #include "base/callback.h" #include "googleurl/src/gurl.h" #include "webkit/quota/quota_types.h" +#include "webkit/storage/webkit_storage_export.h" namespace quota { @@ -19,7 +20,7 @@ namespace quota { // Each storage API must provide an implementation of this interface and // register it to the quota manager. // All the methods are assumed to be called on the IO thread in the browser. -class QuotaClient { +class WEBKIT_STORAGE_EXPORT QuotaClient { public: typedef base::Callback<void(int64)> GetUsageCallback; // NOLINT typedef base::Callback<void(const std::set<GURL>&, StorageType)> diff --git a/webkit/quota/quota_database.h b/webkit/quota/quota_database.h index 1fed8fa..2450559 100644 --- a/webkit/quota/quota_database.h +++ b/webkit/quota/quota_database.h @@ -17,6 +17,7 @@ #include "base/timer.h" #include "googleurl/src/gurl.h" #include "webkit/quota/quota_types.h" +#include "webkit/storage/webkit_storage_export.h" namespace sql { class Connection; @@ -30,7 +31,7 @@ namespace quota { class SpecialStoragePolicy; // All the methods of this class must run on the DB thread. -class QuotaDatabase { +class WEBKIT_STORAGE_EXPORT_PRIVATE QuotaDatabase { public: // Constants for {Get,Set}QuotaConfigValue keys. static const char kDesiredAvailableSpaceKey[]; @@ -87,7 +88,7 @@ class QuotaDatabase { bool SetOriginDatabaseBootstrapped(bool bootstrap_flag); private: - struct QuotaTableEntry { + struct WEBKIT_STORAGE_EXPORT_PRIVATE QuotaTableEntry { QuotaTableEntry(); QuotaTableEntry( const std::string& host, @@ -97,10 +98,10 @@ class QuotaDatabase { StorageType type; int64 quota; }; - friend bool operator <(const QuotaTableEntry& lhs, - const QuotaTableEntry& rhs); + friend WEBKIT_STORAGE_EXPORT_PRIVATE bool operator <( + const QuotaTableEntry& lhs, const QuotaTableEntry& rhs); - struct OriginInfoTableEntry { + struct WEBKIT_STORAGE_EXPORT_PRIVATE OriginInfoTableEntry { OriginInfoTableEntry(); OriginInfoTableEntry( const GURL& origin, @@ -114,8 +115,8 @@ class QuotaDatabase { base::Time last_access_time; base::Time last_modified_time; }; - friend bool operator <(const OriginInfoTableEntry& lhs, - const OriginInfoTableEntry& rhs); + friend WEBKIT_STORAGE_EXPORT_PRIVATE bool operator <( + const OriginInfoTableEntry& lhs, const OriginInfoTableEntry& rhs); // Structures used for CreateSchema. struct TableSchema { diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h index cdd104f4..62f21d2 100644 --- a/webkit/quota/quota_manager.h +++ b/webkit/quota/quota_manager.h @@ -24,6 +24,7 @@ #include "webkit/quota/quota_database.h" #include "webkit/quota/quota_task.h" #include "webkit/quota/special_storage_policy.h" +#include "webkit/storage/webkit_storage_export.h" class FilePath; @@ -54,7 +55,7 @@ struct QuotaAndUsage { }; // An interface called by QuotaTemporaryStorageEvictor. -class QuotaEvictionHandler { +class WEBKIT_STORAGE_EXPORT QuotaEvictionHandler { public: typedef base::Callback<void(const GURL&)> GetLRUOriginCallback; typedef StatusCallback EvictOriginDataCallback; @@ -93,10 +94,10 @@ struct UsageInfo { // The quota manager class. This class is instantiated per profile and // held by the profile. With the exception of the constructor and the // proxy() method, all methods should only be called on the IO thread. -class QuotaManager : public QuotaTaskObserver, - public QuotaEvictionHandler, - public base::RefCountedThreadSafe< - QuotaManager, QuotaManagerDeleter> { +class WEBKIT_STORAGE_EXPORT QuotaManager + : public QuotaTaskObserver, + public QuotaEvictionHandler, + public base::RefCountedThreadSafe<QuotaManager, QuotaManagerDeleter> { public: typedef base::Callback<void(QuotaStatusCode, int64 /* usage */, @@ -215,6 +216,7 @@ class QuotaManager : public QuotaTaskObserver, private: friend class base::DeleteHelper<QuotaManager>; + friend class base::RefCountedThreadSafe<QuotaManager, QuotaManagerDeleter>; friend class MockQuotaManager; friend class MockStorageClient; friend class quota_internals::QuotaInternalsProxy; @@ -418,7 +420,7 @@ struct QuotaManagerDeleter { }; // The proxy may be called and finally released on any thread. -class QuotaManagerProxy +class WEBKIT_STORAGE_EXPORT QuotaManagerProxy : public base::RefCountedThreadSafe<QuotaManagerProxy> { public: virtual void RegisterClient(QuotaClient* client); diff --git a/webkit/quota/quota_task.h b/webkit/quota/quota_task.h index bdc77d6..1102dac 100644 --- a/webkit/quota/quota_task.h +++ b/webkit/quota/quota_task.h @@ -11,6 +11,7 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/sequenced_task_runner_helpers.h" +#include "webkit/storage/webkit_storage_export.h" namespace base { class SingleThreadTaskRunner; @@ -60,7 +61,7 @@ class QuotaTask { bool delete_scheduled_; }; -class QuotaTaskObserver { +class WEBKIT_STORAGE_EXPORT QuotaTaskObserver { protected: friend class QuotaTask; diff --git a/webkit/quota/quota_temporary_storage_evictor.h b/webkit/quota/quota_temporary_storage_evictor.h index d526a70..d3eb14f 100644 --- a/webkit/quota/quota_temporary_storage_evictor.h +++ b/webkit/quota/quota_temporary_storage_evictor.h @@ -12,6 +12,7 @@ #include "base/threading/non_thread_safe.h" #include "base/timer.h" #include "webkit/quota/quota_types.h" +#include "webkit/storage/webkit_storage_export.h" class GURL; @@ -20,7 +21,8 @@ namespace quota { class QuotaEvictionHandler; struct QuotaAndUsage; -class QuotaTemporaryStorageEvictor : public base::NonThreadSafe { +class WEBKIT_STORAGE_EXPORT_PRIVATE QuotaTemporaryStorageEvictor + : public base::NonThreadSafe { public: struct Statistics { Statistics() diff --git a/webkit/quota/special_storage_policy.h b/webkit/quota/special_storage_policy.h index 60ddaa0..a048f63 100644 --- a/webkit/quota/special_storage_policy.h +++ b/webkit/quota/special_storage_policy.h @@ -9,6 +9,7 @@ #include "base/memory/ref_counted.h" #include "base/observer_list.h" +#include "webkit/storage/webkit_storage_export.h" class GURL; @@ -20,7 +21,7 @@ namespace quota { // is currently installed in the extensions system. // The IsSomething() methods must be thread-safe, however Observers should // only be notified, added, and removed on the IO thead. -class SpecialStoragePolicy +class WEBKIT_STORAGE_EXPORT SpecialStoragePolicy : public base::RefCountedThreadSafe<SpecialStoragePolicy> { public: class Observer { diff --git a/webkit/quota/webkit_quota.gypi b/webkit/quota/webkit_quota.gypi index 240516a..a43600e 100644 --- a/webkit/quota/webkit_quota.gypi +++ b/webkit/quota/webkit_quota.gypi @@ -3,40 +3,22 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'quota', - 'type': 'static_library', - 'variables': { 'enable_wexit_time_destructors': 1, }, - 'dependencies': [ - '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', - '<(DEPTH)/net/net.gyp:net', - '<(DEPTH)/sql/sql.gyp:sql', - ], - 'sources': [ - 'quota_client.h', - 'quota_database.cc', - 'quota_database.h', - 'quota_manager.cc', - 'quota_manager.h', - 'quota_task.cc', - 'quota_task.h', - 'quota_temporary_storage_evictor.cc', - 'quota_temporary_storage_evictor.h', - 'quota_types.h', - 'special_storage_policy.cc', - 'special_storage_policy.h', - 'usage_tracker.cc', - 'usage_tracker.h', - ], - 'conditions': [ - ['inside_chromium_build==0', { - 'dependencies': [ - '<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers', - ], - }], - ], - }, - ], + 'variables': { + 'webkit_quota_sources': [ + '../quota/quota_client.h', + '../quota/quota_database.cc', + '../quota/quota_database.h', + '../quota/quota_manager.cc', + '../quota/quota_manager.h', + '../quota/quota_task.cc', + '../quota/quota_task.h', + '../quota/quota_temporary_storage_evictor.cc', + '../quota/quota_temporary_storage_evictor.h', + '../quota/quota_types.h', + '../quota/special_storage_policy.cc', + '../quota/special_storage_policy.h', + '../quota/usage_tracker.cc', + '../quota/usage_tracker.h', + ], + }, } diff --git a/webkit/storage/webkit_storage.gypi b/webkit/storage/webkit_storage.gypi index e38ffc7..344a2f1 100644 --- a/webkit/storage/webkit_storage.gypi +++ b/webkit/storage/webkit_storage.gypi @@ -15,8 +15,10 @@ 'includes': [ '../appcache/webkit_appcache.gypi', '../blob/webkit_blob.gypi', + '../database/webkit_database.gypi', '../dom_storage/webkit_dom_storage.gypi', '../fileapi/webkit_fileapi.gypi', + '../quota/webkit_quota.gypi', ], 'targets': [ { @@ -32,19 +34,18 @@ '<(DEPTH)/sql/sql.gyp:sql', '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', - '<(DEPTH)/webkit/support/webkit_support.gyp:database', - '<(DEPTH)/webkit/support/webkit_support.gyp:quota', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_base', '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit', ], 'defines': ['WEBKIT_STORAGE_IMPLEMENTATION'], 'sources': [ - # TODO(hashimoto): Import all storage related modules. crbug.com/155242 '../storage/webkit_storage_export.h', '<@(webkit_appcache_sources)', '<@(webkit_blob_sources)', + '<@(webkit_database_sources)', '<@(webkit_dom_storage_sources)', '<@(webkit_fileapi_sources)', + '<@(webkit_quota_sources)', ], 'conditions': [ ['inside_chromium_build==0', { diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi index de2a810..41e2d86 100644 --- a/webkit/support/webkit_support.gypi +++ b/webkit/support/webkit_support.gypi @@ -21,7 +21,6 @@ '<(DEPTH)/testing/gtest.gyp:gtest', '<(DEPTH)/third_party/hyphen/hyphen.gyp:hyphen', '<(DEPTH)/ui/ui.gyp:ui', - 'database', 'glue', 'user_agent', 'webkit_base', diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi index da43582..1087441 100644 --- a/webkit/tools/test_shell/test_shell.gypi +++ b/webkit/tools/test_shell/test_shell.gypi @@ -48,9 +48,7 @@ '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:inspector_resources', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', - '<(DEPTH)/webkit/support/webkit_support.gyp:database', '<(DEPTH)/webkit/support/webkit_support.gyp:glue', - '<(DEPTH)/webkit/support/webkit_support.gyp:quota', '<(DEPTH)/webkit/support/webkit_support.gyp:user_agent', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_base', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu', |