diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 20:29:47 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 20:29:47 +0000 |
commit | 07abfeef1f921f596d6815f95dabb9f6d0afe596 (patch) | |
tree | 43c46eb3301720b14f85977d64a80ecd8b704cb5 /webkit/quota/quota_manager.cc | |
parent | a2cdf1e8ca027b5bc7aa38df5761b86376da6932 (diff) | |
download | chromium_src-07abfeef1f921f596d6815f95dabb9f6d0afe596.zip chromium_src-07abfeef1f921f596d6815f95dabb9f6d0afe596.tar.gz chromium_src-07abfeef1f921f596d6815f95dabb9f6d0afe596.tar.bz2 |
base::Bind: Final cleanups in webkit/quota.
BUG=none
TEST=none
R=csilv@chromium.org
Review URL: http://codereview.chromium.org/8342004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/quota/quota_manager.cc')
-rw-r--r-- | webkit/quota/quota_manager.cc | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/webkit/quota/quota_manager.cc b/webkit/quota/quota_manager.cc index 99f6449..5392054 100644 --- a/webkit/quota/quota_manager.cc +++ b/webkit/quota/quota_manager.cc @@ -12,7 +12,6 @@ #include "base/callback.h" #include "base/command_line.h" #include "base/file_path.h" -#include "base/memory/ref_counted.h" #include "base/message_loop_proxy.h" #include "base/metrics/histogram.h" #include "base/string_number_conversions.h" @@ -1559,10 +1558,12 @@ void QuotaManager::DeleteOnCorrectThread() const { void QuotaManagerProxy::RegisterClient(QuotaClient* client) { if (!io_thread_->BelongsToCurrentThread()) { - io_thread_->PostTask(FROM_HERE, NewRunnableMethod( - this, &QuotaManagerProxy::RegisterClient, client)); + io_thread_->PostTask( + FROM_HERE, + base::Bind(&QuotaManagerProxy::RegisterClient, this, client)); return; } + if (manager_) manager_->RegisterClient(client); else @@ -1574,11 +1575,13 @@ void QuotaManagerProxy::NotifyStorageAccessed( const GURL& origin, StorageType type) { if (!io_thread_->BelongsToCurrentThread()) { - io_thread_->PostTask(FROM_HERE, NewRunnableMethod( - this, &QuotaManagerProxy::NotifyStorageAccessed, - client_id, origin, type)); + io_thread_->PostTask( + FROM_HERE, + base::Bind(&QuotaManagerProxy::NotifyStorageAccessed, this, client_id, + origin, type)); return; } + if (manager_) manager_->NotifyStorageAccessed(client_id, origin, type); } @@ -1589,11 +1592,13 @@ void QuotaManagerProxy::NotifyStorageModified( StorageType type, int64 delta) { if (!io_thread_->BelongsToCurrentThread()) { - io_thread_->PostTask(FROM_HERE, NewRunnableMethod( - this, &QuotaManagerProxy::NotifyStorageModified, - client_id, origin, type, delta)); + io_thread_->PostTask( + FROM_HERE, + base::Bind(&QuotaManagerProxy::NotifyStorageModified, this, client_id, + origin, type, delta)); return; } + if (manager_) manager_->NotifyStorageModified(client_id, origin, type, delta); } @@ -1601,10 +1606,12 @@ void QuotaManagerProxy::NotifyStorageModified( void QuotaManagerProxy::NotifyOriginInUse( const GURL& origin) { if (!io_thread_->BelongsToCurrentThread()) { - io_thread_->PostTask(FROM_HERE, NewRunnableMethod( - this, &QuotaManagerProxy::NotifyOriginInUse, origin)); + io_thread_->PostTask( + FROM_HERE, + base::Bind(&QuotaManagerProxy::NotifyOriginInUse, this, origin)); return; } + if (manager_) manager_->NotifyOriginInUse(origin); } @@ -1612,8 +1619,10 @@ void QuotaManagerProxy::NotifyOriginInUse( void QuotaManagerProxy::NotifyOriginNoLongerInUse( const GURL& origin) { if (!io_thread_->BelongsToCurrentThread()) { - io_thread_->PostTask(FROM_HERE, NewRunnableMethod( - this, &QuotaManagerProxy::NotifyOriginNoLongerInUse, origin)); + io_thread_->PostTask( + FROM_HERE, + base::Bind(&QuotaManagerProxy::NotifyOriginNoLongerInUse, this, + origin)); return; } if (manager_) |