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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 6812004: sync: Make nudge + config jobs reliable in SyncerThread2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync backend host to call configure on right thread. Created 9 years, 8 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
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 361b0c0363e13991c1f559259c75b4644d2f9cde..07cfe7fb95e07cbfae92d16eb3d4439f9db53a72 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -412,8 +412,10 @@ void SyncBackendHost::ConfigureDataTypes(
// If we're doing the first configure (at startup) this is redundant as the
// syncer thread always must start in config mode.
if (using_new_syncer_thread_) {
- core_->syncapi()->StartConfigurationMode(NewCallback(core_.get(),
- &SyncBackendHost::Core::FinishConfigureDataTypes));
+ core_thread_.message_loop()->PostTask(
+ FROM_HERE,
+ NewRunnableMethod(core_.get(),
+ &SyncBackendHost::Core::StartConfigurationMode));
} else {
FinishConfigureDataTypesOnFrontendLoop();
}
@@ -653,6 +655,11 @@ void SyncBackendHost::Core::CreateSyncNotifier(
request_context_getter));
}
+void SyncBackendHost::Core::StartConfigurationMode() {
tim (not reviewing) 2011/04/15 00:21:43 should call this 'DoStartConfigurationMode'
lipalani1 2011/04/15 01:24:39 Done.
+ syncapi_->StartConfigurationMode(NewCallback(this,
+ &SyncBackendHost::Core::FinishConfigureDataTypes));
+}
+
SyncBackendHost::Core::DoInitializeOptions::DoInitializeOptions(
const GURL& service_url,
sync_api::HttpPostProviderFactory* http_bridge_factory,

Powered by Google App Engine
This is Rietveld 408576698