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

Unified Diff: chrome/browser/sessions/base_session_service.h

Issue 8677030: base::Bind: Convert more of chrome/browser/sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 9 years, 1 month 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 | chrome/browser/sessions/base_session_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/base_session_service.h
diff --git a/chrome/browser/sessions/base_session_service.h b/chrome/browser/sessions/base_session_service.h
index 57c464f76df3b96cd140dc465de66c409cfb32f9..92d3fe2231e9f711d0d872ecc61fdea286c7c673 100644
--- a/chrome/browser/sessions/base_session_service.h
+++ b/chrome/browser/sessions/base_session_service.h
@@ -7,9 +7,10 @@
#pragma once
#include "base/basictypes.h"
-#include "base/callback_old.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/sessions/session_id.h"
#include "content/browser/cancelable_request.h"
@@ -55,7 +56,8 @@ class BaseSessionService : public CancelableRequestProvider,
class InternalGetCommandsRequest;
- typedef Callback2<Handle, scoped_refptr<InternalGetCommandsRequest> >::Type
+ typedef base::Callback<void(Handle,
+ scoped_refptr<InternalGetCommandsRequest>)>
InternalGetCommandsCallback;
// Callback used when fetching the last session. The last session consists
@@ -63,7 +65,7 @@ class BaseSessionService : public CancelableRequestProvider,
class InternalGetCommandsRequest :
public CancelableRequest<InternalGetCommandsCallback> {
public:
- explicit InternalGetCommandsRequest(CallbackType* callback)
+ explicit InternalGetCommandsRequest(const CallbackType& callback)
: CancelableRequest<InternalGetCommandsCallback>(callback) {
}
@@ -172,7 +174,7 @@ class BaseSessionService : public CancelableRequestProvider,
base::Thread* backend_thread_;
// Used to invoke Save.
- ScopedRunnableMethodFactory<BaseSessionService> save_factory_;
+ base::WeakPtrFactory<BaseSessionService> weak_factory_;
// Commands we need to send over to the backend.
std::vector<SessionCommand*> pending_commands_;
« no previous file with comments | « no previous file | chrome/browser/sessions/base_session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698