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

Unified Diff: webkit/fileapi/file_system_quota_client.h

Issue 10828177: Refactors FileSystemQuotaClient using base::Callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 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
« no previous file with comments | « no previous file | webkit/fileapi/file_system_quota_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_quota_client.h
diff --git a/webkit/fileapi/file_system_quota_client.h b/webkit/fileapi/file_system_quota_client.h
index adca8a6f4fc1034b3e635f5a0607bafb752684ef..688a720e526b457899a2a12d175cbdf8b5799381 100644
--- a/webkit/fileapi/file_system_quota_client.h
+++ b/webkit/fileapi/file_system_quota_client.h
@@ -17,7 +17,6 @@
#include "webkit/fileapi/file_system_quota_util.h"
#include "webkit/fileapi/file_system_types.h"
#include "webkit/quota/quota_client.h"
-#include "webkit/quota/quota_task.h"
namespace base {
class SequencedTaskRunner;
@@ -33,8 +32,7 @@ class FileSystemContext;
// All of the public methods of this class are called by the quota manager
// (except for the constructor/destructor).
class FILEAPI_EXPORT_PRIVATE FileSystemQuotaClient
- : public NON_EXPORTED_BASE(quota::QuotaClient),
- public quota::QuotaTaskObserver {
+ : public NON_EXPORTED_BASE(quota::QuotaClient) {
public:
FileSystemQuotaClient(
FileSystemContext* file_system_context,
@@ -60,46 +58,12 @@ class FILEAPI_EXPORT_PRIVATE FileSystemQuotaClient
const DeletionCallback& callback) OVERRIDE;
private:
- class GetOriginUsageTask;
- class GetOriginsTaskBase;
- class GetOriginsForTypeTask;
- class GetOriginsForHostTask;
- class DeleteOriginTask;
-
- typedef std::pair<fileapi::FileSystemType, std::string> TypeAndHostOrOrigin;
- typedef quota::CallbackQueueMap1<GetUsageCallback,
- TypeAndHostOrOrigin,
- int64
- > UsageCallbackMap;
- typedef quota::CallbackQueueMap2<GetOriginsCallback,
- fileapi::FileSystemType,
- const std::set<GURL>&,
- quota::StorageType
- > OriginsForTypeCallbackMap;
- typedef quota::CallbackQueueMap2<GetOriginsCallback,
- TypeAndHostOrOrigin,
- const std::set<GURL>&,
- quota::StorageType
- > OriginsForHostCallbackMap;
-
- void DidGetOriginUsage(fileapi::FileSystemType type,
- const GURL& origin, int64 usage);
- void DidGetOriginsForType(fileapi::FileSystemType type,
- const std::set<GURL>& origins);
- void DidGetOriginsForHost(const TypeAndHostOrOrigin& type_and_host,
- const std::set<GURL>& origins);
-
base::SequencedTaskRunner* file_task_runner() const;
scoped_refptr<FileSystemContext> file_system_context_;
bool is_incognito_;
- // Pending callbacks.
- UsageCallbackMap pending_usage_callbacks_;
- OriginsForTypeCallbackMap pending_origins_for_type_callbacks_;
- OriginsForHostCallbackMap pending_origins_for_host_callbacks_;
-
DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClient);
};
« no previous file with comments | « no previous file | webkit/fileapi/file_system_quota_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698