Commit a853f37e authored by nhiroki@chromium.org's avatar nhiroki@chromium.org

Clean up FileSystemQuotaClient.

BUG=139270


Review URL: https://chromiumcodereview.appspot.com/10830330

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151661 0039d316-1c4b-4281-b951-d872f2087c98
parent 11aa5a85
...@@ -31,7 +31,8 @@ namespace fileapi { ...@@ -31,7 +31,8 @@ namespace fileapi {
namespace { namespace {
void GetOriginsForTypeOnFileThread(FileSystemContext* context, void GetOriginsForTypeOnFileThread(
FileSystemContext* context,
StorageType storage_type, StorageType storage_type,
std::set<GURL>* origins_ptr) { std::set<GURL>* origins_ptr) {
FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type); FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type);
...@@ -43,7 +44,8 @@ void GetOriginsForTypeOnFileThread(FileSystemContext* context, ...@@ -43,7 +44,8 @@ void GetOriginsForTypeOnFileThread(FileSystemContext* context,
quota_util->GetOriginsForTypeOnFileThread(type, origins_ptr); quota_util->GetOriginsForTypeOnFileThread(type, origins_ptr);
} }
void GetOriginsForHostOnFileThread(FileSystemContext* context, void GetOriginsForHostOnFileThread(
FileSystemContext* context,
StorageType storage_type, StorageType storage_type,
const std::string& host, const std::string& host,
std::set<GURL>* origins_ptr) { std::set<GURL>* origins_ptr) {
...@@ -57,13 +59,13 @@ void GetOriginsForHostOnFileThread(FileSystemContext* context, ...@@ -57,13 +59,13 @@ void GetOriginsForHostOnFileThread(FileSystemContext* context,
} }
void DidGetOrigins( void DidGetOrigins(
const base::Callback<void(const std::set<GURL>&, StorageType)>& callback, const quota::QuotaClient::GetOriginsCallback& callback,
std::set<GURL>* origins_ptr, std::set<GURL>* origins_ptr,
StorageType storage_type) { StorageType storage_type) {
callback.Run(*origins_ptr, storage_type); callback.Run(*origins_ptr, storage_type);
} }
quota::QuotaStatusCode DeleteOriginOnTargetThread( quota::QuotaStatusCode DeleteOriginOnFileThread(
FileSystemContext* context, FileSystemContext* context,
const GURL& origin, const GURL& origin,
FileSystemType type) { FileSystemType type) {
...@@ -179,7 +181,8 @@ void FileSystemQuotaClient::GetOriginsForHost( ...@@ -179,7 +181,8 @@ void FileSystemQuotaClient::GetOriginsForHost(
storage_type)); storage_type));
} }
void FileSystemQuotaClient::DeleteOriginData(const GURL& origin, void FileSystemQuotaClient::DeleteOriginData(
const GURL& origin,
StorageType type, StorageType type,
const DeletionCallback& callback) { const DeletionCallback& callback) {
FileSystemType fs_type = QuotaStorageTypeToFileSystemType(type); FileSystemType fs_type = QuotaStorageTypeToFileSystemType(type);
...@@ -188,7 +191,7 @@ void FileSystemQuotaClient::DeleteOriginData(const GURL& origin, ...@@ -188,7 +191,7 @@ void FileSystemQuotaClient::DeleteOriginData(const GURL& origin,
base::PostTaskAndReplyWithResult( base::PostTaskAndReplyWithResult(
file_task_runner(), file_task_runner(),
FROM_HERE, FROM_HERE,
base::Bind(&DeleteOriginOnTargetThread, base::Bind(&DeleteOriginOnFileThread,
file_system_context_, file_system_context_,
origin, origin,
fs_type), fs_type),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment