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

Unified Diff: storage/browser/fileapi/quota/quota_backend_impl.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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
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
« no previous file with comments | « storage/browser/fileapi/quota/quota_backend_impl.h ('k') | storage/browser/fileapi/quota/quota_reservation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698