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

Unified Diff: chrome/browser/browsing_data_local_storage_helper.h

Issue 8393036: base::Bind: Convert BrowsingDataLocalStorageHelper::StartFetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/browser/browsing_data_local_storage_helper.h
diff --git a/chrome/browser/browsing_data_local_storage_helper.h b/chrome/browser/browsing_data_local_storage_helper.h
index 53a88a925088fabfc99669ec8e8ac4fa630d8d86..62cbcae12b6eb01c6771decbb22cc32f3e78d86c 100644
--- a/chrome/browser/browsing_data_local_storage_helper.h
+++ b/chrome/browser/browsing_data_local_storage_helper.h
@@ -10,7 +10,8 @@
#include <set>
#include <string>
-#include "base/callback_old.h"
+#include "base/callback.h"
+#include "base/compiler_specific.h"
#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
@@ -64,13 +65,14 @@ class BrowsingDataLocalStorageHelper
// callback.
// This must be called only in the UI thread.
virtual void StartFetching(
- Callback1<const std::list<LocalStorageInfo>& >::Type* callback);
+ const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback)
+ OVERRIDE;
// Cancels the notification callback (i.e., the window that created it no
// longer exists).
// This must be called only in the UI thread.
- virtual void CancelNotification();
+ virtual void CancelNotification() OVERRIDE;
// Requests a single local storage file to be deleted in the WEBKIT thread.
- virtual void DeleteLocalStorageFile(const FilePath& file_path);
+ virtual void DeleteLocalStorageFile(const FilePath& file_path) OVERRIDE;
protected:
friend class base::RefCountedThreadSafe<BrowsingDataLocalStorageHelper>;
@@ -82,8 +84,7 @@ class BrowsingDataLocalStorageHelper
Profile* profile_;
// This only mutates on the UI thread.
- scoped_ptr<Callback1<const std::list<LocalStorageInfo>& >::Type >
- completion_callback_;
+ base::Callback<void(const std::list<LocalStorageInfo>&)> completion_callback_;
// Indicates whether or not we're currently fetching information:
// it's true when StartFetching() is called in the UI thread, and it's reset
@@ -113,7 +114,7 @@ class CannedBrowsingDataLocalStorageHelper
// Return a copy of the local storage helper. Only one consumer can use the
// StartFetching method at a time, so we need to create a copy of the helper
- // everytime we instantiate a cookies tree model for it.
+ // every time we instantiate a cookies tree model for it.
CannedBrowsingDataLocalStorageHelper* Clone();
// Add a local storage to the set of canned local storages that is returned
@@ -126,10 +127,11 @@ class CannedBrowsingDataLocalStorageHelper
// True if no local storages are currently stored.
bool empty() const;
- // BrowsingDataLocalStorageHelper methods.
+ // BrowsingDataLocalStorageHelper implementation.
virtual void StartFetching(
- Callback1<const std::list<LocalStorageInfo>& >::Type* callback);
- virtual void CancelNotification() {}
+ const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback)
+ OVERRIDE;
+ virtual void CancelNotification() OVERRIDE {}
private:
virtual ~CannedBrowsingDataLocalStorageHelper();

Powered by Google App Engine
This is Rietveld 408576698