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..419336e5448ad535218114c5075914b8c94cadf1 100644 |
--- a/chrome/browser/sessions/base_session_service.h |
+++ b/chrome/browser/sessions/base_session_service.h |
@@ -10,6 +10,7 @@ |
#include "base/callback_old.h" |
csilv
2011/11/24 00:01:04
change to callback.h
James Hawkins
2011/11/24 00:15:36
Done.
|
#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_; |