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

Unified Diff: chrome/browser/sync_file_system/sync_file_system_service_factory.cc

Issue 23618029: [SyncFS] Implement Database initialization part of SyncEngineInitializer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, commint fix Created 7 years, 3 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 | « chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/sync_file_system_service_factory.cc
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_factory.cc b/chrome/browser/sync_file_system/sync_file_system_service_factory.cc
index 282abbd7859628cce3766464e19f16da9d473d1d..a2a3addd86b60cef53430a90c85ea198acf89cf8 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service_factory.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service_factory.cc
@@ -80,11 +80,14 @@ SyncFileSystemServiceFactory::BuildServiceInstanceFor(
GURL wapi_base_url(
google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction);
+ scoped_refptr<base::SequencedWorkerPool> worker_pool(
+ content::BrowserThread::GetBlockingPool());
+
scoped_ptr<drive::DriveAPIService> drive_api_service(
new drive::DriveAPIService(
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
context->GetRequestContext(),
- content::BrowserThread::GetBlockingPool(),
+ worker_pool.get(),
base_drive_url, base_download_url, wapi_base_url,
std::string() /* custom_user_agent */));
@@ -93,9 +96,15 @@ SyncFileSystemServiceFactory::BuildServiceInstanceFor(
ExtensionService* extension_service =
extensions::ExtensionSystem::Get(profile)->extension_service();
+ scoped_refptr<base::SequencedTaskRunner> task_runner(
+ worker_pool->GetSequencedTaskRunnerWithShutdownBehavior(
+ worker_pool->GetSequenceToken(),
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
+
scoped_ptr<drive_backend::SyncEngine> sync_engine(
new drive_backend::SyncEngine(
context->GetPath(),
+ task_runner.get(),
drive_api_service.Pass(),
notification_manager,
extension_service));
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698