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

Unified Diff: chrome/browser/profile_impl.cc

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
Index: chrome/browser/profile_impl.cc
===================================================================
--- chrome/browser/profile_impl.cc (revision 58702)
+++ chrome/browser/profile_impl.cc (working copy)
@@ -479,6 +479,7 @@
// Delete the NTP resource cache so we can unregister pref observers.
ntp_resource_cache_.reset();
+ // The sync service needs to be deleted before the services it calls.
sync_service_.reset();
// Both HistoryService and WebDataService maintain threads for background
@@ -1235,10 +1236,16 @@
}
ProfileSyncService* ProfileImpl::GetProfileSyncService() {
+ return GetProfileSyncService("");
+}
+
+ProfileSyncService* ProfileImpl::GetProfileSyncService(
+ const std::string& cros_user) {
+
if (!ProfileSyncService::IsSyncEnabled())
return NULL;
if (!sync_service_.get())
- InitSyncService();
+ InitSyncService(cros_user);
return sync_service_.get();
}
@@ -1248,11 +1255,11 @@
return cloud_print_proxy_service_.get();
}
-void ProfileImpl::InitSyncService() {
+void ProfileImpl::InitSyncService(const std::string& cros_user) {
profile_sync_factory_.reset(
new ProfileSyncFactoryImpl(this, CommandLine::ForCurrentProcess()));
sync_service_.reset(
- profile_sync_factory_->CreateProfileSyncService());
+ profile_sync_factory_->CreateProfileSyncService(cros_user));
sync_service_->Initialize();
}

Powered by Google App Engine
This is Rietveld 408576698