Commit f9331623 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Sync cleanup: Remove SigninManagerWrapper::GetSyncScopeToUse

As of https://crrev.com/c/997654, Sync support for Supervised Users is
gone, so GetSyncScopeToUse isn't required anymore.

Bug: 829304
Change-Id: Ie912abfa75eb15b05b7f7b23067ea83550bfdecf
Reviewed-on: https://chromium-review.googlesource.com/1016285Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551639}
parent bc77a6b6
......@@ -67,6 +67,7 @@
#include "components/sync_sessions/sessions_sync_manager.h"
#include "components/sync_sessions/sync_sessions_client.h"
#include "components/version_info/version_info_values.h"
#include "google_apis/gaia/gaia_constants.h"
#include "net/cookies/cookie_monster.h"
#include "net/url_request/url_request_context_getter.h"
......@@ -434,7 +435,7 @@ SyncCredentials ProfileSyncService::GetCredentials() {
if (credentials.sync_token.empty())
credentials.sync_token = "credentials_lost";
credentials.scope_set.insert(signin_->GetSyncScopeToUse());
credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope);
return credentials;
}
......@@ -1810,7 +1811,7 @@ void ProfileSyncService::RequestAccessToken() {
return;
request_access_token_retry_timer_.Stop();
OAuth2TokenService::ScopeSet oauth2_scopes;
oauth2_scopes.insert(signin_->GetSyncScopeToUse());
oauth2_scopes.insert(GaiaConstants::kChromeSyncOAuth2Scope);
// Invalidate previous token, otherwise token service will return the same
// token again.
......
......@@ -5,7 +5,6 @@
#include "components/sync/driver/signin_manager_wrapper.h"
#include "components/signin/core/browser/signin_manager_base.h"
#include "google_apis/gaia/gaia_constants.h"
SigninManagerWrapper::SigninManagerWrapper(
identity::IdentityManager* identity_manager,
......@@ -29,7 +28,3 @@ std::string SigninManagerWrapper::GetEffectiveUsername() const {
std::string SigninManagerWrapper::GetAccountIdToUse() const {
return signin_manager_->GetAuthenticatedAccountId();
}
std::string SigninManagerWrapper::GetSyncScopeToUse() const {
return GaiaConstants::kChromeSyncOAuth2Scope;
}
......@@ -15,24 +15,19 @@ namespace identity {
class IdentityManager;
}
// Wraps SigninManager so subclasses can support different ways of getting
// account information if necessary. Currently exists for supervised users;
// the subclass SupervisedUserSigninManagerWrapper may be merged back into
// this class once supervised users are componentized.
// TODO(crbug.com/825190): Get rid of this class after ProfileSyncService
// doesn't use SigninManager anymore.
class SigninManagerWrapper {
public:
explicit SigninManagerWrapper(identity::IdentityManager* identity_manager,
SigninManagerBase* signin_manager);
virtual ~SigninManagerWrapper();
~SigninManagerWrapper();
// Get the email address to use for this account.
virtual std::string GetEffectiveUsername() const;
std::string GetEffectiveUsername() const;
// Get the unique ID used to represent this account.
virtual std::string GetAccountIdToUse() const;
// Get the OAuth2 scope to use for this account.
virtual std::string GetSyncScopeToUse() const;
std::string GetAccountIdToUse() const;
// Return the original IdentityManager object that was passed in.
identity::IdentityManager* GetIdentityManager();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment