| 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";
|
| }
|
|
|