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

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: choke lint Created 9 years, 3 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: webkit/appcache/appcache_quota_client.h
diff --git a/webkit/appcache/appcache_quota_client.h b/webkit/appcache/appcache_quota_client.h
index 444577939ac3d3367de5f331832479d7139f5736..6e523212bb7228f4b4f4bac5bedbd6b04f58c386 100644
--- a/webkit/appcache/appcache_quota_client.h
+++ b/webkit/appcache/appcache_quota_client.h
@@ -38,15 +38,15 @@ class AppCacheQuotaClient : public quota::QuotaClient {
virtual void OnQuotaManagerDestroyed();
virtual void GetOriginUsage(const GURL& origin,
quota::StorageType type,
- GetUsageCallback* callback) OVERRIDE;
+ GetUsageCallback callback) OVERRIDE;
virtual void GetOriginsForType(quota::StorageType type,
- GetOriginsCallback* callback) OVERRIDE;
+ GetOriginsCallback callback) OVERRIDE;
virtual void GetOriginsForHost(quota::StorageType type,
const std::string& host,
- GetOriginsCallback* callback) OVERRIDE;
+ GetOriginsCallback callback) OVERRIDE;
virtual void DeleteOriginData(const GURL& origin,
quota::StorageType type,
- DeletionCallback* callback) OVERRIDE;
+ DeletionCallback callback) OVERRIDE;
private:
friend class AppCacheService; // for NotifyAppCacheIsDestroyed
@@ -56,17 +56,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;
@@ -77,7 +86,7 @@ class AppCacheQuotaClient : public quota::QuotaClient {
void DidDeleteAppCachesForOrigin(int rv);
void GetOriginsHelper(quota::StorageType type,
const std::string& opt_host,
- GetOriginsCallback* callback_ptr);
+ GetOriginsCallback callback_ptr);
void ProcessPendingRequests();
void AbortPendingRequests();
void DeletePendingRequests();
@@ -95,7 +104,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::CancelableCompletionCallback<AppCacheQuotaClient> >
service_delete_callback_;

Powered by Google App Engine
This is Rietveld 408576698