diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 19:15:26 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 19:15:26 +0000 |
commit | 7c5f2ec9461aa36833e208944abce93a8a810394 (patch) | |
tree | 8c9a481e18b2a050e075429bb29a046cd1109428 /webkit/support | |
parent | 208aad79d76c5c9a5e05322be674b2d81738cb68 (diff) | |
download | chromium_src-7c5f2ec9461aa36833e208944abce93a8a810394.zip chromium_src-7c5f2ec9461aa36833e208944abce93a8a810394.tar.gz chromium_src-7c5f2ec9461aa36833e208944abce93a8a810394.tar.bz2 |
More WebSQLDatabase and QuotaManager integration.
1) Fix bugs with how usage and deltas in usage were being computed. The tracker was reporting confusing numbers because in some cases it was stat'ing files and in other cases it was using a value cached in memory. Now the tracker always uses a cached value for open database files, and updates the cached value when changes are noticed. During that update, delta notifications are sent.
2) Remove the old and unsed support for quota from the DatabaseTracker. Changes to the class interface rippled to various unit tests.
BUG=61676
TEST=updated existing unit tests
Review URL: http://codereview.chromium.org/7056025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/simple_database_system.cc | 8 | ||||
-rw-r--r-- | webkit/support/simple_database_system.h | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/webkit/support/simple_database_system.cc b/webkit/support/simple_database_system.cc index 30c8388..da5f688 100644 --- a/webkit/support/simple_database_system.cc +++ b/webkit/support/simple_database_system.cc @@ -155,12 +155,11 @@ void SimpleDatabaseSystem::DatabaseOpened(const string16& origin_identifier, int64 estimated_size) { DCHECK(db_thread_proxy_->BelongsToCurrentThread()); int64 database_size = 0; - int64 space_available_not_used = 0; db_tracker_->DatabaseOpened( origin_identifier, database_name, description, - estimated_size, &database_size, &space_available_not_used); + estimated_size, &database_size); OnDatabaseSizeChanged(origin_identifier, database_name, - database_size, 0); + database_size); } void SimpleDatabaseSystem::DatabaseModified(const string16& origin_identifier, @@ -179,8 +178,7 @@ void SimpleDatabaseSystem::DatabaseClosed(const string16& origin_identifier, void SimpleDatabaseSystem::OnDatabaseSizeChanged( const string16& origin_identifier, const string16& database_name, - int64 database_size, - int64 space_available_not_used) { + int64 database_size) { DCHECK(db_thread_proxy_->BelongsToCurrentThread()); // We intentionally call into webkit on our background db_thread_ // to better emulate what happens in chrome where this method is diff --git a/webkit/support/simple_database_system.h b/webkit/support/simple_database_system.h index 56e6657..79b7493 100644 --- a/webkit/support/simple_database_system.h +++ b/webkit/support/simple_database_system.h @@ -64,8 +64,7 @@ class SimpleDatabaseSystem : public webkit_database::DatabaseTracker::Observer, // DatabaseTracker::Observer implementation virtual void OnDatabaseSizeChanged(const string16& origin_identifier, const string16& database_name, - int64 database_size, - int64 space_available); + int64 database_size); virtual void OnDatabaseScheduledForDeletion(const string16& origin_identifier, const string16& database_name); |