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

Unified Diff: storage/browser/fileapi/file_system_quota_client.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/file_system_quota_client.cc
diff --git a/webkit/browser/fileapi/file_system_quota_client.cc b/storage/browser/fileapi/file_system_quota_client.cc
similarity index 69%
rename from webkit/browser/fileapi/file_system_quota_client.cc
rename to storage/browser/fileapi/file_system_quota_client.cc
index 3dce21886a514090d47d2bdf4f3f56731d002366..0ca799742f50d2e3ecd09705fff9b4e72ba2f7e7 100644
--- a/webkit/browser/fileapi/file_system_quota_client.cc
+++ b/storage/browser/fileapi/file_system_quota_client.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/file_system_quota_client.h"
+#include "storage/browser/fileapi/file_system_quota_client.h"
#include <algorithm>
#include <set>
@@ -18,22 +18,21 @@
#include "base/task_runner_util.h"
#include "net/base/net_util.h"
#include "url/gurl.h"
-#include "webkit/browser/fileapi/file_system_context.h"
-#include "webkit/browser/fileapi/file_system_quota_util.h"
-#include "webkit/browser/fileapi/file_system_usage_cache.h"
-#include "webkit/browser/fileapi/sandbox_file_system_backend.h"
-#include "webkit/common/fileapi/file_system_util.h"
+#include "storage/browser/fileapi/file_system_context.h"
+#include "storage/browser/fileapi/file_system_quota_util.h"
+#include "storage/browser/fileapi/file_system_usage_cache.h"
+#include "storage/browser/fileapi/sandbox_file_system_backend.h"
+#include "storage/common/fileapi/file_system_util.h"
using quota::StorageType;
-namespace fileapi {
+namespace storage {
namespace {
-void GetOriginsForTypeOnFileTaskRunner(
- FileSystemContext* context,
- StorageType storage_type,
- std::set<GURL>* origins_ptr) {
+void GetOriginsForTypeOnFileTaskRunner(FileSystemContext* context,
+ StorageType storage_type,
+ std::set<GURL>* origins_ptr) {
FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type);
DCHECK(type != kFileSystemTypeUnknown);
@@ -43,11 +42,10 @@ void GetOriginsForTypeOnFileTaskRunner(
quota_util->GetOriginsForTypeOnFileTaskRunner(type, origins_ptr);
}
-void GetOriginsForHostOnFileTaskRunner(
- FileSystemContext* context,
- StorageType storage_type,
- const std::string& host,
- std::set<GURL>* origins_ptr) {
+void GetOriginsForHostOnFileTaskRunner(FileSystemContext* context,
+ StorageType storage_type,
+ const std::string& host,
+ std::set<GURL>* origins_ptr) {
FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type);
DCHECK(type != kFileSystemTypeUnknown);
@@ -57,16 +55,14 @@ void GetOriginsForHostOnFileTaskRunner(
quota_util->GetOriginsForHostOnFileTaskRunner(type, host, origins_ptr);
}
-void DidGetOrigins(
- const quota::QuotaClient::GetOriginsCallback& callback,
- std::set<GURL>* origins_ptr) {
+void DidGetOrigins(const quota::QuotaClient::GetOriginsCallback& callback,
+ std::set<GURL>* origins_ptr) {
callback.Run(*origins_ptr);
}
-quota::QuotaStatusCode DeleteOriginOnFileTaskRunner(
- FileSystemContext* context,
- const GURL& origin,
- FileSystemType type) {
+quota::QuotaStatusCode DeleteOriginOnFileTaskRunner(FileSystemContext* context,
+ const GURL& origin,
+ FileSystemType type) {
FileSystemBackend* provider = context->GetFileSystemBackend(type);
if (!provider || !provider->GetQuotaUtil())
return quota::kQuotaErrorNotSupported;
@@ -83,11 +79,11 @@ quota::QuotaStatusCode DeleteOriginOnFileTaskRunner(
FileSystemQuotaClient::FileSystemQuotaClient(
FileSystemContext* file_system_context,
bool is_incognito)
- : file_system_context_(file_system_context),
- is_incognito_(is_incognito) {
+ : file_system_context_(file_system_context), is_incognito_(is_incognito) {
}
-FileSystemQuotaClient::~FileSystemQuotaClient() {}
+FileSystemQuotaClient::~FileSystemQuotaClient() {
+}
quota::QuotaClient::ID FileSystemQuotaClient::id() const {
return quota::QuotaClient::kFileSystem;
@@ -97,10 +93,9 @@ void FileSystemQuotaClient::OnQuotaManagerDestroyed() {
delete this;
}
-void FileSystemQuotaClient::GetOriginUsage(
- const GURL& origin_url,
- StorageType storage_type,
- const GetUsageCallback& callback) {
+void FileSystemQuotaClient::GetOriginUsage(const GURL& origin_url,
+ StorageType storage_type,
+ const GetUsageCallback& callback) {
DCHECK(!callback.is_null());
if (is_incognito_) {
@@ -149,9 +144,7 @@ void FileSystemQuotaClient::GetOriginsForType(
file_system_context_,
storage_type,
base::Unretained(origins_ptr)),
- base::Bind(&DidGetOrigins,
- callback,
- base::Owned(origins_ptr)));
+ base::Bind(&DidGetOrigins, callback, base::Owned(origins_ptr)));
}
void FileSystemQuotaClient::GetOriginsForHost(
@@ -175,25 +168,20 @@ void FileSystemQuotaClient::GetOriginsForHost(
storage_type,
host,
base::Unretained(origins_ptr)),
- base::Bind(&DidGetOrigins,
- callback,
- base::Owned(origins_ptr)));
+ base::Bind(&DidGetOrigins, callback, base::Owned(origins_ptr)));
}
-void FileSystemQuotaClient::DeleteOriginData(
- const GURL& origin,
- StorageType type,
- const DeletionCallback& callback) {
+void FileSystemQuotaClient::DeleteOriginData(const GURL& origin,
+ StorageType type,
+ const DeletionCallback& callback) {
FileSystemType fs_type = QuotaStorageTypeToFileSystemType(type);
DCHECK(fs_type != kFileSystemTypeUnknown);
base::PostTaskAndReplyWithResult(
file_task_runner(),
FROM_HERE,
- base::Bind(&DeleteOriginOnFileTaskRunner,
- file_system_context_,
- origin,
- fs_type),
+ base::Bind(
+ &DeleteOriginOnFileTaskRunner, file_system_context_, origin, fs_type),
callback);
}
@@ -207,4 +195,4 @@ base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const {
return file_system_context_->default_file_task_runner();
}
-} // namespace fileapi
+} // namespace storage
« no previous file with comments | « storage/browser/fileapi/file_system_quota_client.h ('k') | storage/browser/fileapi/file_system_quota_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698