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

Unified Diff: components/sync/model/model_type_store.h

Issue 2863173002: [Sync] Switch ModelTypeStore* from blocking pool to post_task.h (Closed)
Patch Set: Self review. Created 3 years, 7 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
« no previous file with comments | « components/browser_sync/profile_sync_service.cc ('k') | components/sync/model/model_type_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model/model_type_store.h
diff --git a/components/sync/model/model_type_store.h b/components/sync/model/model_type_store.h
index d3ad346e0988780fa4726d2ea4cf72fc03c2abf2..d52d2efec187bd55efd83e4566614ea153d483c1 100644
--- a/components/sync/model/model_type_store.h
+++ b/components/sync/model/model_type_store.h
@@ -17,10 +17,6 @@
#include "components/sync/model/metadata_change_list.h"
#include "components/sync/model/model_error.h"
-namespace base {
-class SequencedTaskRunner;
-} // namespace base
-
namespace syncer {
// ModelTypeStore is leveldb backed store for model type's data, metadata and
@@ -124,24 +120,14 @@ class ModelTypeStore {
base::Callback<void(base::Optional<ModelError> error,
std::unique_ptr<MetadataBatch> metadata_batch)>;
- // CreateStore takes |path| and |blocking_task_runner|. Here is how to get
- // task runner in production code:
- //
- // base::SequencedWorkerPool* worker_pool =
- // content::BrowserThread::GetBlockingPool();
- // scoped_refptr<base::SequencedTaskRunner> blocking_task_runner(
- // worker_pool->GetSequencedTaskRunnerWithShutdownBehavior(
- // worker_pool->GetNamedSequenceToken(path),
- // base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
- //
- // In test get task runner from MessageLoop::task_runner().
+ // CreateStore takes |path|, and will run blocking calls on a task runner
+ // scoped to the given path. Tests likely don't want to use this method.
static void CreateStore(
ModelType type,
const std::string& path,
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
const InitCallback& callback);
- // Creates store object backed by in-memory leveldb database. It is used in
- // tests.
+ // Creates store object backed by in-memory leveldb database, gets its task
+ // runner from MessageLoop::task_runner(), and should only be used in tests.
static void CreateInMemoryStoreForTest(ModelType type,
const InitCallback& callback);
« no previous file with comments | « components/browser_sync/profile_sync_service.cc ('k') | components/sync/model/model_type_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698