Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: webkit/quota/quota_manager.cc

Issue 8342004: base::Bind: Final cleanups in webkit/quota. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/quota/mock_storage_client.cc ('k') | webkit/quota/quota_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/quota_manager.cc
diff --git a/webkit/quota/quota_manager.cc b/webkit/quota/quota_manager.cc
index 99f64497c5e1784397a17ba3b32fc74050053e5b..5392054d5168de20891a6488467a35b4afe8ce54 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_)
« no previous file with comments | « webkit/quota/mock_storage_client.cc ('k') | webkit/quota/quota_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698