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 3e600e1c4f4cbb47655bd0c5337df7edad5126ef..06d273a8c55803ff14bf58f395c2fc9bd00ca3cf 100644 |
--- a/chrome/browser/sync/glue/sync_backend_host.cc |
+++ b/chrome/browser/sync/glue/sync_backend_host.cc |
@@ -51,12 +51,12 @@ namespace browser_sync { |
using sessions::SyncSessionSnapshot; |
using sync_api::SyncCredentials; |
-SyncBackendHost::SyncBackendHost(SyncFrontend* frontend, Profile* profile) |
+SyncBackendHost::SyncBackendHost(Profile* profile) |
: core_(new Core(ALLOW_THIS_IN_INITIALIZER_LIST(this))), |
core_thread_("Chrome_SyncCoreThread"), |
frontend_loop_(MessageLoop::current()), |
profile_(profile), |
- frontend_(frontend), |
+ frontend_(NULL), |
sync_data_folder_path_( |
profile_->GetPath().Append(kSyncDataFolderName)), |
last_auth_error_(AuthError::None()), |
@@ -78,6 +78,7 @@ SyncBackendHost::~SyncBackendHost() { |
} |
void SyncBackendHost::Initialize( |
+ SyncFrontend* frontend, |
const GURL& sync_service_url, |
const syncable::ModelTypeSet& types, |
URLRequestContextGetter* baseline_context_getter, |
@@ -87,6 +88,9 @@ void SyncBackendHost::Initialize( |
if (!core_thread_.Start()) |
return; |
+ frontend_ = frontend; |
+ DCHECK(frontend); |
+ |
// Create a worker for the UI thread and route bookmark changes to it. |
// TODO(tim): Pull this into a method to reuse. For now we don't even |
// need to lock because we init before the syncapi exists and we tear down |