| 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 be2c258dc3d3ed81ea4648165c3e375a7538a6bb..fc6eaa5cefb0c82f49e7d3be6a30a58184de70ad 100644
|
| --- a/chrome/browser/sessions/base_session_service.h
|
| +++ b/chrome/browser/sessions/base_session_service.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/memory/weak_ptr.h"
|
| +#include "base/threading/sequenced_worker_pool.h"
|
| #include "chrome/browser/common/cancelable_request.h"
|
| #include "chrome/browser/sessions/session_id.h"
|
| #include "chrome/common/cancelable_task_tracker.h"
|
| @@ -154,14 +155,15 @@ class BaseSessionService : public CancelableRequestProvider {
|
| const InternalGetCommandsCallback& callback,
|
| CancelableTaskTracker* tracker);
|
|
|
| - // In production, this posts the task to the FILE thread. For
|
| + // In production, this posts the task to the SequencedWorkerPool. For
|
| // tests, it immediately runs the specified task on the current
|
| // thread.
|
| bool RunTaskOnBackendThread(const tracked_objects::Location& from_here,
|
| const base::Closure& task);
|
|
|
| // Returns true if we appear to be running in production, false if we appear
|
| - // to be running as part of a unit test or if the FILE thread has gone away.
|
| + // to be running as part of a unit test or if the SequencedWorkerPool has
|
| + // been asked to shutdown.
|
| bool RunningInProduction() const;
|
|
|
| // Max number of navigation entries in each direction we'll persist.
|
| @@ -189,6 +191,9 @@ class BaseSessionService : public CancelableRequestProvider {
|
| // The number of commands sent to the backend before doing a reset.
|
| int commands_since_reset_;
|
|
|
| + // A token to make sure that all tasks will be serialized.
|
| + base::SequencedWorkerPool::SequenceToken sequence_token_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(BaseSessionService);
|
| };
|
|
|
|
|