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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 281433004: Cleanup: Pull Managed User logic out of ProfileSyncService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « chrome/browser/sync/managed_user_signin_manager_wrapper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5fd1b8dc852acdebbe9ff94cddb3329d099e435a..a0931ec9a8f05a8bdb37c2fb07f68b8086e12345 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -69,7 +69,6 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
-#include "google_apis/gaia/gaia_constants.h"
#include "grit/generated_resources.h"
#include "net/cookies/cookie_monster.h"
#include "net/url_request/url_request_context_getter.h"
@@ -87,10 +86,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/time_format.h"
-#if defined(ENABLE_MANAGED_USERS)
-#include "chrome/browser/managed_mode/managed_user_constants.h"
-#endif
-
#if defined(OS_ANDROID)
#include "sync/internal_api/public/read_transaction.h"
#endif
@@ -1976,11 +1971,7 @@ void ProfileSyncService::RequestAccessToken() {
return;
request_access_token_retry_timer_.Stop();
OAuth2TokenService::ScopeSet oauth2_scopes;
- if (profile_->IsManaged()) {
- oauth2_scopes.insert(GaiaConstants::kChromeSyncManagedOAuth2Scope);
- } else {
- oauth2_scopes.insert(GaiaConstants::kChromeSyncOAuth2Scope);
- }
+ oauth2_scopes.insert(signin_->GetSyncScopeToUse());
// Invalidate previous token, otherwise token service will return the same
// token again.
« no previous file with comments | « chrome/browser/sync/managed_user_signin_manager_wrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698