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

Unified Diff: chrome/browser/supervised_user/supervised_user_service.cc

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Use parameter Created 3 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/supervised_user/supervised_user_service.cc
diff --git a/chrome/browser/supervised_user/supervised_user_service.cc b/chrome/browser/supervised_user/supervised_user_service.cc
index 324f525d62632145ea2ce299f1691c02c2797820..47dde07ef9c6189a7336117063797403bbf4f86f 100644
--- a/chrome/browser/supervised_user/supervised_user_service.cc
+++ b/chrome/browser/supervised_user/supervised_user_service.cc
@@ -1257,17 +1257,15 @@ syncer::ModelTypeSet SupervisedUserService::GetPreferredDataTypes() const {
}
#if !defined(OS_ANDROID)
-void SupervisedUserService::OnStateChanged() {
- browser_sync::ProfileSyncService* service =
- ProfileSyncServiceFactory::GetForProfile(profile_);
- if (waiting_for_sync_initialization_ && service->IsEngineInitialized()) {
+void SupervisedUserService::OnStateChanged(syncer::SyncService* sync) {
+ if (waiting_for_sync_initialization_ && sync->IsEngineInitialized()) {
waiting_for_sync_initialization_ = false;
- service->RemoveObserver(this);
+ sync->RemoveObserver(this);
FinishSetupSync();
return;
}
- DLOG_IF(ERROR, service->GetAuthError().state() ==
+ DLOG_IF(ERROR, sync->GetAuthError().state() ==
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)
<< "Credentials rejected";
}

Powered by Google App Engine
This is Rietveld 408576698