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

Unified Diff: webkit/appcache/appcache_quota_client.h

Issue 8070001: Use base::Callback in Quota related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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 | « content/browser/renderer_host/quota_dispatcher_host.cc ('k') | webkit/appcache/appcache_quota_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_quota_client.h
diff --git a/webkit/appcache/appcache_quota_client.h b/webkit/appcache/appcache_quota_client.h
index 5f0387cc68e843a3a6ef8a2db9ccfc98a3b38ff6..175f0179b9f919492513b13d8879acc5818f830d 100644
--- a/webkit/appcache/appcache_quota_client.h
+++ b/webkit/appcache/appcache_quota_client.h
@@ -39,15 +39,15 @@ class AppCacheQuotaClient : public quota::QuotaClient {
virtual void OnQuotaManagerDestroyed();
virtual void GetOriginUsage(const GURL& origin,
quota::StorageType type,
- GetUsageCallback* callback) OVERRIDE;
+ const GetUsageCallback& callback) OVERRIDE;
virtual void GetOriginsForType(quota::StorageType type,
- GetOriginsCallback* callback) OVERRIDE;
+ const GetOriginsCallback& callback) OVERRIDE;
virtual void GetOriginsForHost(quota::StorageType type,
const std::string& host,
- GetOriginsCallback* callback) OVERRIDE;
+ const GetOriginsCallback& callback) OVERRIDE;
virtual void DeleteOriginData(const GURL& origin,
quota::StorageType type,
- DeletionCallback* callback) OVERRIDE;
+ const DeletionCallback& callback) OVERRIDE;
private:
friend class AppCacheService; // for NotifyAppCacheIsDestroyed
@@ -57,17 +57,26 @@ class AppCacheQuotaClient : public quota::QuotaClient {
struct UsageRequest {
GURL origin;
quota::StorageType type;
- GetUsageCallback* callback;
+ GetUsageCallback callback;
+
+ UsageRequest();
+ ~UsageRequest();
};
struct OriginsRequest {
quota::StorageType type;
std::string opt_host;
- GetOriginsCallback* callback;
+ GetOriginsCallback callback;
+
+ OriginsRequest();
+ ~OriginsRequest();
};
struct DeleteRequest {
GURL origin;
quota::StorageType type;
- DeletionCallback* callback;
+ DeletionCallback callback;
+
+ DeleteRequest();
+ ~DeleteRequest();
};
typedef std::deque<UsageRequest> UsageRequestQueue;
typedef std::deque<OriginsRequest> OriginsRequestQueue;
@@ -78,7 +87,7 @@ class AppCacheQuotaClient : public quota::QuotaClient {
void DidDeleteAppCachesForOrigin(int rv);
void GetOriginsHelper(quota::StorageType type,
const std::string& opt_host,
- GetOriginsCallback* callback_ptr);
+ const GetOriginsCallback& callback);
void ProcessPendingRequests();
void AbortPendingRequests();
void DeletePendingRequests();
@@ -96,7 +105,7 @@ class AppCacheQuotaClient : public quota::QuotaClient {
// And once it's ready, we can only handle one delete request at a time,
// so we queue up additional requests while one is in already in progress.
- scoped_ptr<DeletionCallback> current_delete_request_callback_;
+ DeletionCallback current_delete_request_callback_;
scoped_refptr<net::CancelableOldCompletionCallback<AppCacheQuotaClient> >
service_delete_callback_;
« no previous file with comments | « content/browser/renderer_host/quota_dispatcher_host.cc ('k') | webkit/appcache/appcache_quota_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698