Index: storage/browser/quota/quota_manager_proxy.cc |
diff --git a/webkit/browser/quota/quota_manager_proxy.cc b/storage/browser/quota/quota_manager_proxy.cc |
similarity index 55% |
rename from webkit/browser/quota/quota_manager_proxy.cc |
rename to storage/browser/quota/quota_manager_proxy.cc |
index 20b42c3d3e34090a826de02aece308da83085f42..8d56f5912c79b2719fd05245c9167d56b06657ec 100644 |
--- a/webkit/browser/quota/quota_manager_proxy.cc |
+++ b/storage/browser/quota/quota_manager_proxy.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "webkit/browser/quota/quota_manager_proxy.h" |
+#include "storage/browser/quota/quota_manager_proxy.h" |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
@@ -19,13 +19,18 @@ namespace { |
void DidGetUsageAndQuota( |
base::SequencedTaskRunner* original_task_runner, |
const QuotaManagerProxy::GetUsageAndQuotaCallback& callback, |
- QuotaStatusCode status, int64 usage, int64 quota) { |
+ QuotaStatusCode status, |
+ int64 usage, |
+ int64 quota) { |
if (!original_task_runner->RunsTasksOnCurrentThread()) { |
original_task_runner->PostTask( |
FROM_HERE, |
base::Bind(&DidGetUsageAndQuota, |
make_scoped_refptr(original_task_runner), |
- callback, status, usage, quota)); |
+ callback, |
+ status, |
+ usage, |
+ quota)); |
return; |
} |
callback.Run(status, usage, quota); |
@@ -47,15 +52,16 @@ void QuotaManagerProxy::RegisterClient(QuotaClient* client) { |
client->OnQuotaManagerDestroyed(); |
} |
-void QuotaManagerProxy::NotifyStorageAccessed( |
- QuotaClient::ID client_id, |
- const GURL& origin, |
- StorageType type) { |
+void QuotaManagerProxy::NotifyStorageAccessed(QuotaClient::ID client_id, |
+ const GURL& origin, |
+ StorageType type) { |
if (!io_thread_->BelongsToCurrentThread()) { |
- io_thread_->PostTask( |
- FROM_HERE, |
- base::Bind(&QuotaManagerProxy::NotifyStorageAccessed, this, client_id, |
- origin, type)); |
+ io_thread_->PostTask(FROM_HERE, |
+ base::Bind(&QuotaManagerProxy::NotifyStorageAccessed, |
+ this, |
+ client_id, |
+ origin, |
+ type)); |
return; |
} |
@@ -63,16 +69,18 @@ void QuotaManagerProxy::NotifyStorageAccessed( |
manager_->NotifyStorageAccessed(client_id, origin, type); |
} |
-void QuotaManagerProxy::NotifyStorageModified( |
- QuotaClient::ID client_id, |
- const GURL& origin, |
- StorageType type, |
- int64 delta) { |
+void QuotaManagerProxy::NotifyStorageModified(QuotaClient::ID client_id, |
+ const GURL& origin, |
+ StorageType type, |
+ int64 delta) { |
if (!io_thread_->BelongsToCurrentThread()) { |
- io_thread_->PostTask( |
- FROM_HERE, |
- base::Bind(&QuotaManagerProxy::NotifyStorageModified, this, client_id, |
- origin, type, delta)); |
+ io_thread_->PostTask(FROM_HERE, |
+ base::Bind(&QuotaManagerProxy::NotifyStorageModified, |
+ this, |
+ client_id, |
+ origin, |
+ type, |
+ delta)); |
return; |
} |
@@ -80,8 +88,7 @@ void QuotaManagerProxy::NotifyStorageModified( |
manager_->NotifyStorageModified(client_id, origin, type, delta); |
} |
-void QuotaManagerProxy::NotifyOriginInUse( |
- const GURL& origin) { |
+void QuotaManagerProxy::NotifyOriginInUse(const GURL& origin) { |
if (!io_thread_->BelongsToCurrentThread()) { |
io_thread_->PostTask( |
FROM_HERE, |
@@ -93,13 +100,12 @@ void QuotaManagerProxy::NotifyOriginInUse( |
manager_->NotifyOriginInUse(origin); |
} |
-void QuotaManagerProxy::NotifyOriginNoLongerInUse( |
- const GURL& origin) { |
+void QuotaManagerProxy::NotifyOriginNoLongerInUse(const GURL& origin) { |
if (!io_thread_->BelongsToCurrentThread()) { |
io_thread_->PostTask( |
FROM_HERE, |
- base::Bind(&QuotaManagerProxy::NotifyOriginNoLongerInUse, this, |
- origin)); |
+ base::Bind( |
+ &QuotaManagerProxy::NotifyOriginNoLongerInUse, this, origin)); |
return; |
} |
if (manager_) |
@@ -111,10 +117,13 @@ void QuotaManagerProxy::SetUsageCacheEnabled(QuotaClient::ID client_id, |
StorageType type, |
bool enabled) { |
if (!io_thread_->BelongsToCurrentThread()) { |
- io_thread_->PostTask( |
- FROM_HERE, |
- base::Bind(&QuotaManagerProxy::SetUsageCacheEnabled, this, |
- client_id, origin, type, enabled)); |
+ io_thread_->PostTask(FROM_HERE, |
+ base::Bind(&QuotaManagerProxy::SetUsageCacheEnabled, |
+ this, |
+ client_id, |
+ origin, |
+ type, |
+ enabled)); |
return; |
} |
if (manager_) |
@@ -127,11 +136,13 @@ void QuotaManagerProxy::GetUsageAndQuota( |
StorageType type, |
const GetUsageAndQuotaCallback& callback) { |
if (!io_thread_->BelongsToCurrentThread()) { |
- io_thread_->PostTask( |
- FROM_HERE, |
- base::Bind(&QuotaManagerProxy::GetUsageAndQuota, this, |
- make_scoped_refptr(original_task_runner), |
- origin, type, callback)); |
+ io_thread_->PostTask(FROM_HERE, |
+ base::Bind(&QuotaManagerProxy::GetUsageAndQuota, |
+ this, |
+ make_scoped_refptr(original_task_runner), |
+ origin, |
+ type, |
+ callback)); |
return; |
} |
if (!manager_) { |
@@ -139,9 +150,11 @@ void QuotaManagerProxy::GetUsageAndQuota( |
return; |
} |
manager_->GetUsageAndQuota( |
- origin, type, |
+ origin, |
+ type, |
base::Bind(&DidGetUsageAndQuota, |
- make_scoped_refptr(original_task_runner), callback)); |
+ make_scoped_refptr(original_task_runner), |
+ callback)); |
} |
QuotaManager* QuotaManagerProxy::quota_manager() const { |
@@ -149,8 +162,8 @@ QuotaManager* QuotaManagerProxy::quota_manager() const { |
return manager_; |
} |
-QuotaManagerProxy::QuotaManagerProxy( |
- QuotaManager* manager, base::SingleThreadTaskRunner* io_thread) |
+QuotaManagerProxy::QuotaManagerProxy(QuotaManager* manager, |
+ base::SingleThreadTaskRunner* io_thread) |
: manager_(manager), io_thread_(io_thread) { |
} |