| 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 92d3fe2231e9f711d0d872ecc61fdea286c7c673..7f43d43672313e93fa0de2e2a6e9a06544380680 100644
|
| --- a/chrome/browser/sessions/base_session_service.h
|
| +++ b/chrome/browser/sessions/base_session_service.h
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/callback.h"
|
| +#include "base/location.h"
|
| #include "base/file_path.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| @@ -22,10 +23,6 @@ class SessionBackend;
|
| class SessionCommand;
|
| class TabNavigation;
|
|
|
| -namespace base {
|
| -class Thread;
|
| -}
|
| -
|
| // BaseSessionService is the super class of both tab restore service and
|
| // session service. It contains commonality needed by both, in particular
|
| // it manages a set of SessionCommands that are periodically sent to a
|
| @@ -85,9 +82,6 @@ class BaseSessionService : public CancelableRequestProvider,
|
| // Returns the backend.
|
| SessionBackend* backend() const { return backend_; }
|
|
|
| - // Returns the thread the backend runs on. This returns NULL during testing.
|
| - base::Thread* backend_thread() const { return backend_thread_; }
|
| -
|
| // Returns the set of commands that needed to be scheduled. The commands
|
| // in the vector are owned by BaseSessionService, until they are scheduled
|
| // on the backend at which point the backend owns the commands.
|
| @@ -157,6 +151,12 @@ class BaseSessionService : public CancelableRequestProvider,
|
| InternalGetCommandsRequest* request,
|
| CancelableRequestConsumerBase* consumer);
|
|
|
| + // In production, this posts the task to the FILE thread. For
|
| + // tests, it immediately runs the specified task on the current
|
| + // thread.
|
| + bool RunTaskOnBackendThread(const tracked_objects::Location& from_here,
|
| + const base::Closure& task);
|
| +
|
| // Max number of navigation entries in each direction we'll persist.
|
| static const int max_persist_navigation_count;
|
|
|
| @@ -170,9 +170,6 @@ class BaseSessionService : public CancelableRequestProvider,
|
| // The backend.
|
| scoped_refptr<SessionBackend> backend_;
|
|
|
| - // Thread backend tasks are run on, is NULL during testing.
|
| - base::Thread* backend_thread_;
|
| -
|
| // Used to invoke Save.
|
| base::WeakPtrFactory<BaseSessionService> weak_factory_;
|
|
|
|
|