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

Unified Diff: webkit/quota/usage_tracker.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/quota/usage_tracker.h
diff --git a/webkit/quota/usage_tracker.h b/webkit/quota/usage_tracker.h
index 258ef160fc2e735611d4a4725e475fefea883efe..1e8c181dd40dba9ff2a6236fd43c594a3df41829 100644
--- a/webkit/quota/usage_tracker.h
+++ b/webkit/quota/usage_tracker.h
@@ -13,7 +13,6 @@
#include "base/basictypes.h"
#include "base/callback.h"
-#include "base/memory/scoped_callback_factory.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "googleurl/src/gurl.h"
@@ -38,8 +37,8 @@ class UsageTracker : public QuotaTaskObserver {
StorageType type() const { return type_; }
ClientUsageTracker* GetClientTracker(QuotaClient::ID client_id);
- void GetGlobalUsage(GlobalUsageCallback* callback);
- void GetHostUsage(const std::string& host, HostUsageCallback* callback);
+ void GetGlobalUsage(GlobalUsageCallback callback);
+ void GetHostUsage(const std::string& host, HostUsageCallback callback);
void UpdateUsageCache(QuotaClient::ID client_id,
const GURL& origin,
int64 delta);
@@ -74,7 +73,7 @@ class UsageTracker : public QuotaTaskObserver {
GlobalUsageCallbackQueue global_usage_callbacks_;
HostUsageCallbackMap host_usage_callbacks_;
- base::ScopedCallbackFactory<UsageTracker> callback_factory_;
+ base::WeakPtrFactory<UsageTracker> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(UsageTracker);
};
@@ -89,8 +88,8 @@ class ClientUsageTracker : public SpecialStoragePolicy::Observer,
SpecialStoragePolicy* special_storage_policy);
virtual ~ClientUsageTracker();
- void GetGlobalUsage(GlobalUsageCallback* callback);
- void GetHostUsage(const std::string& host, HostUsageCallback* callback);
+ void GetGlobalUsage(GlobalUsageCallback callback);
+ void GetHostUsage(const std::string& host, HostUsageCallback callback);
void UpdateUsageCache(const GURL& origin, int64 delta);
void GetCachedOrigins(std::set<GURL>* origins) const;

Powered by Google App Engine
This is Rietveld 408576698