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

Unified Diff: storage/browser/fileapi/sandbox_quota_observer.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/sandbox_quota_observer.cc
diff --git a/webkit/browser/fileapi/sandbox_quota_observer.cc b/storage/browser/fileapi/sandbox_quota_observer.cc
similarity index 79%
rename from webkit/browser/fileapi/sandbox_quota_observer.cc
rename to storage/browser/fileapi/sandbox_quota_observer.cc
index 42b6d08604cf5d53da81c8cde598c809d3f3cce3..ebafe8bb0d1703f0c3fb63a5b4a48d9859b2c592 100644
--- a/webkit/browser/fileapi/sandbox_quota_observer.cc
+++ b/storage/browser/fileapi/sandbox_quota_observer.cc
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/browser/fileapi/sandbox_quota_observer.h"
+#include "storage/browser/fileapi/sandbox_quota_observer.h"
#include "base/sequenced_task_runner.h"
-#include "webkit/browser/fileapi/file_system_url.h"
-#include "webkit/browser/fileapi/file_system_usage_cache.h"
-#include "webkit/browser/fileapi/sandbox_file_system_backend_delegate.h"
-#include "webkit/browser/fileapi/timed_task_helper.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_url.h"
+#include "storage/browser/fileapi/file_system_usage_cache.h"
+#include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h"
+#include "storage/browser/fileapi/timed_task_helper.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 {
SandboxQuotaObserver::SandboxQuotaObserver(
quota::QuotaManagerProxy* quota_manager_proxy,
@@ -23,9 +23,11 @@ SandboxQuotaObserver::SandboxQuotaObserver(
: quota_manager_proxy_(quota_manager_proxy),
update_notify_runner_(update_notify_runner),
sandbox_file_util_(sandbox_file_util),
- file_system_usage_cache_(file_system_usage_cache) {}
+ file_system_usage_cache_(file_system_usage_cache) {
+}
-SandboxQuotaObserver::~SandboxQuotaObserver() {}
+SandboxQuotaObserver::~SandboxQuotaObserver() {
+}
void SandboxQuotaObserver::OnStartUpdate(const FileSystemURL& url) {
DCHECK(update_notify_runner_->RunsTasksOnCurrentThread());
@@ -35,8 +37,7 @@ void SandboxQuotaObserver::OnStartUpdate(const FileSystemURL& url) {
file_system_usage_cache_->IncrementDirty(usage_file_path);
}
-void SandboxQuotaObserver::OnUpdate(const FileSystemURL& url,
- int64 delta) {
+void SandboxQuotaObserver::OnUpdate(const FileSystemURL& url, int64 delta) {
DCHECK(update_notify_runner_->RunsTasksOnCurrentThread());
if (quota_manager_proxy_.get()) {
@@ -89,10 +90,9 @@ void SandboxQuotaObserver::OnAccess(const FileSystemURL& url) {
}
}
-void SandboxQuotaObserver::SetUsageCacheEnabled(
- const GURL& origin,
- FileSystemType type,
- bool enabled) {
+void SandboxQuotaObserver::SetUsageCacheEnabled(const GURL& origin,
+ FileSystemType type,
+ bool enabled) {
if (quota_manager_proxy_.get()) {
quota_manager_proxy_->SetUsageCacheEnabled(
quota::QuotaClient::kFileSystem,
@@ -110,8 +110,7 @@ base::FilePath SandboxQuotaObserver::GetUsageCachePath(
SandboxFileSystemBackendDelegate::GetUsageCachePathForOriginAndType(
sandbox_file_util_, url.origin(), url.type(), &error);
if (error != base::File::FILE_OK) {
- LOG(WARNING) << "Could not get usage cache path for: "
- << url.DebugString();
+ LOG(WARNING) << "Could not get usage cache path for: " << url.DebugString();
return base::FilePath();
}
return path;
@@ -136,4 +135,4 @@ void SandboxQuotaObserver::UpdateUsageCacheFile(
file_system_usage_cache_->AtomicUpdateUsageByDelta(usage_file_path, delta);
}
-} // namespace fileapi
+} // namespace storage
« no previous file with comments | « storage/browser/fileapi/sandbox_quota_observer.h ('k') | storage/browser/fileapi/task_runner_bound_observer_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698