| Index: chrome/browser/sync/profile_sync_service.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
|
| index 277c9e3eee885bd7f1b19e669f4c277378f2977f..5e1cb3c68448049fe2aba5a48e1e8a21cee3c71f 100644
|
| --- a/chrome/browser/sync/profile_sync_service.cc
|
| +++ b/chrome/browser/sync/profile_sync_service.cc
|
| @@ -119,6 +119,9 @@ static const char* kOAuth2Scopes[] = {
|
| GaiaConstants::kGoogleTalkOAuth2Scope
|
| };
|
|
|
| +static const char* kManagedOAuth2Scopes[] = {
|
| + GaiaConstants::kChromeSyncManagedOAuth2Scope
|
| +};
|
|
|
| static const char* kSyncUnrecoverableErrorHistogram =
|
| "Sync.UnrecoverableErrors";
|
| @@ -1896,8 +1899,14 @@ void ProfileSyncService::RequestAccessToken() {
|
| return;
|
| request_access_token_retry_timer_.Stop();
|
| OAuth2TokenService::ScopeSet oauth2_scopes;
|
| - for (size_t i = 0; i < arraysize(kOAuth2Scopes); i++)
|
| - oauth2_scopes.insert(kOAuth2Scopes[i]);
|
| + if (ManagedUserService::ProfileIsManaged(profile_)) {
|
| + for (size_t i = 0; i < arraysize(kManagedOAuth2Scopes); i++)
|
| + oauth2_scopes.insert(kManagedOAuth2Scopes[i]);
|
| + } else {
|
| + for (size_t i = 0; i < arraysize(kOAuth2Scopes); i++)
|
| + oauth2_scopes.insert(kOAuth2Scopes[i]);
|
| + }
|
| +
|
| OAuth2TokenService* token_service =
|
| ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
|
| // Invalidate previous token, otherwise token service will return the same
|
|
|