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

Unified Diff: components/browser_sync/profile_sync_service.cc

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.h ('k') | components/sync/model/model_type_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/profile_sync_service.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 1a4dae5bd3731df36cc24ff26b2053e7d5d0f7d3..df12c63fe92a5f8feed337c1d4c2c15162942f71 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -242,12 +242,8 @@ void ProfileSyncService::Initialize() {
syncer::ModelTypeSet(syncer::SESSIONS)));
if (base::FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) {
- // TODO(skym): Stop creating leveldb files when signed out.
- // TODO(skym): Verify using AsUTF8Unsafe is okay here. Should work as long
- // as the Local State file is guaranteed to be UTF-8.
const syncer::ModelTypeStoreFactory& store_factory =
- GetModelTypeStoreFactory(syncer::DEVICE_INFO, base_directory_,
- sync_client_->GetBlockingPool());
+ GetModelTypeStoreFactory(syncer::DEVICE_INFO, base_directory_);
device_info_sync_bridge_ = base::MakeUnique<DeviceInfoSyncBridge>(
local_device_.get(), store_factory,
base::BindRepeating(
@@ -1681,18 +1677,12 @@ void ProfileSyncService::SetPlatformSyncAllowedProvider(
// static
syncer::ModelTypeStoreFactory ProfileSyncService::GetModelTypeStoreFactory(
ModelType type,
- const base::FilePath& base_path,
- base::SequencedWorkerPool* blocking_pool) {
+ const base::FilePath& base_path) {
// TODO(skym): Verify using AsUTF8Unsafe is okay here. Should work as long
// as the Local State file is guaranteed to be UTF-8.
- std::string path = FormatSharedModelTypeStorePath(base_path).AsUTF8Unsafe();
- base::SequencedWorkerPool::SequenceToken sequence_token =
- blocking_pool->GetNamedSequenceToken(path);
- scoped_refptr<base::SequencedTaskRunner> task_runner =
- blocking_pool->GetSequencedTaskRunnerWithShutdownBehavior(
- blocking_pool->GetNamedSequenceToken(path),
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
- return base::Bind(&ModelTypeStore::CreateStore, type, path, task_runner);
+ const std::string path =
+ FormatSharedModelTypeStorePath(base_path).AsUTF8Unsafe();
+ return base::Bind(&ModelTypeStore::CreateStore, type, path);
}
void ProfileSyncService::ConfigureDataTypeManager() {
« no previous file with comments | « components/browser_sync/profile_sync_service.h ('k') | components/sync/model/model_type_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698