Index: storage/browser/fileapi/quota/quota_backend_impl.cc |
diff --git a/webkit/browser/fileapi/quota/quota_backend_impl.cc b/storage/browser/fileapi/quota/quota_backend_impl.cc |
similarity index 85% |
rename from webkit/browser/fileapi/quota/quota_backend_impl.cc |
rename to storage/browser/fileapi/quota/quota_backend_impl.cc |
index de0b3ac0369ce9c842c899f086e82f354a1f3ceb..95959ddf6f2222dc7bd7511328ff905c4857c668 100644 |
--- a/webkit/browser/fileapi/quota/quota_backend_impl.cc |
+++ b/storage/browser/fileapi/quota/quota_backend_impl.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/fileapi/quota/quota_backend_impl.h" |
+#include "storage/browser/fileapi/quota/quota_backend_impl.h" |
#include <string> |
@@ -11,12 +11,12 @@ |
#include "base/logging.h" |
#include "base/numerics/safe_conversions.h" |
#include "base/sequenced_task_runner.h" |
-#include "webkit/browser/fileapi/file_system_usage_cache.h" |
-#include "webkit/browser/quota/quota_client.h" |
-#include "webkit/browser/quota/quota_manager_proxy.h" |
-#include "webkit/common/fileapi/file_system_util.h" |
+#include "storage/browser/fileapi/file_system_usage_cache.h" |
+#include "storage/browser/quota/quota_client.h" |
+#include "storage/browser/quota/quota_manager_proxy.h" |
+#include "storage/common/fileapi/file_system_util.h" |
-namespace fileapi { |
+namespace storage { |
QuotaBackendImpl::QuotaBackendImpl( |
base::SequencedTaskRunner* file_task_runner, |
@@ -45,10 +45,13 @@ void QuotaBackendImpl::ReserveQuota(const GURL& origin, |
} |
DCHECK(quota_manager_proxy_); |
quota_manager_proxy_->GetUsageAndQuota( |
- file_task_runner_, origin, FileSystemTypeToQuotaStorageType(type), |
+ file_task_runner_, |
+ origin, |
+ FileSystemTypeToQuotaStorageType(type), |
base::Bind(&QuotaBackendImpl::DidGetUsageAndQuotaForReserveQuota, |
weak_ptr_factory_.GetWeakPtr(), |
- QuotaReservationInfo(origin, type, delta), callback)); |
+ QuotaReservationInfo(origin, type, delta), |
+ callback)); |
} |
void QuotaBackendImpl::ReleaseReservedQuota(const GURL& origin, |
@@ -102,7 +105,9 @@ void QuotaBackendImpl::DecrementDirtyCount(const GURL& origin, |
void QuotaBackendImpl::DidGetUsageAndQuotaForReserveQuota( |
const QuotaReservationInfo& info, |
const ReserveQuotaCallback& callback, |
- quota::QuotaStatusCode status, int64 usage, int64 quota) { |
+ quota::QuotaStatusCode status, |
+ int64 usage, |
+ int64 quota) { |
DCHECK(file_task_runner_->RunsTasksOnCurrentThread()); |
DCHECK(info.origin.is_valid()); |
DCHECK_LE(0, usage); |
@@ -125,10 +130,8 @@ void QuotaBackendImpl::DidGetUsageAndQuotaForReserveQuota( |
if (callback.Run(base::File::FILE_OK, normalized_info.delta)) |
return; |
// The requester could not accept the reserved quota. Revert it. |
- ReserveQuotaInternal( |
- QuotaReservationInfo(normalized_info.origin, |
- normalized_info.type, |
- -normalized_info.delta)); |
+ ReserveQuotaInternal(QuotaReservationInfo( |
+ normalized_info.origin, normalized_info.type, -normalized_info.delta)); |
} |
void QuotaBackendImpl::ReserveQuotaInternal(const QuotaReservationInfo& info) { |
@@ -136,8 +139,10 @@ void QuotaBackendImpl::ReserveQuotaInternal(const QuotaReservationInfo& info) { |
DCHECK(info.origin.is_valid()); |
DCHECK(quota_manager_proxy_); |
quota_manager_proxy_->NotifyStorageModified( |
- quota::QuotaClient::kFileSystem, info.origin, |
- FileSystemTypeToQuotaStorageType(info.type), info.delta); |
+ quota::QuotaClient::kFileSystem, |
+ info.origin, |
+ FileSystemTypeToQuotaStorageType(info.type), |
+ info.delta); |
} |
base::File::Error QuotaBackendImpl::GetUsageCachePath( |
@@ -155,11 +160,13 @@ base::File::Error QuotaBackendImpl::GetUsageCachePath( |
} |
QuotaBackendImpl::QuotaReservationInfo::QuotaReservationInfo( |
- const GURL& origin, FileSystemType type, int64 delta) |
+ const GURL& origin, |
+ FileSystemType type, |
+ int64 delta) |
: origin(origin), type(type), delta(delta) { |
} |
QuotaBackendImpl::QuotaReservationInfo::~QuotaReservationInfo() { |
} |
-} // namespace fileapi |
+} // namespace storage |