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

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

Issue 6375007: [Sync] Refactored ProfileSyncService and remove its backend() function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compile failure Created 9 years, 11 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 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

Powered by Google App Engine
This is Rietveld 408576698