Commit fcf93231 authored by Colin Blundell's avatar Colin Blundell Committed by Commit Bot

SigninManagerBase: Eliminate unused IsSigninAllowed()

SigninManagerBase exposes an IsSigninAllowed() method. SigninManager
overrides this method with a different implementation. It turns out
that the method is never called on ChromeOS, meaning that the method
on the base class is unnecessary. Eliminating it helps clarify the
technical relationship between SigninManagerBase and SigninManager.

Bug: 814787
Change-Id: I1c496553151010257cb15e08b610eae17fe1941e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1554344
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#648613}
parent 762cfb51
...@@ -112,9 +112,11 @@ class SigninManager : public SigninManagerBase, ...@@ -112,9 +112,11 @@ class SigninManager : public SigninManagerBase,
// up the corresponding account_id and gaia_id for this email. // up the corresponding account_id and gaia_id for this email.
void SignIn(const std::string& username); void SignIn(const std::string& username);
// Returns whether sign-in is allowed. // Returns true if a signin to Chrome is allowed (by policy or pref).
// TODO(crbug.com/806778): Remove method in super-class. // TODO(crbug.com/806778): this method should not be used externally,
bool IsSigninAllowed() const override; // instead the value of the kSigninAllowed preference should be checked.
// Once all external code has been modified, this method will be removed.
bool IsSigninAllowed() const;
// Sets whether sign-in is allowed or not. // Sets whether sign-in is allowed or not.
void SetSigninAllowed(bool allowed); void SetSigninAllowed(bool allowed);
......
...@@ -160,10 +160,6 @@ bool SigninManagerBase::IsInitialized() const { ...@@ -160,10 +160,6 @@ bool SigninManagerBase::IsInitialized() const {
return initialized_; return initialized_;
} }
bool SigninManagerBase::IsSigninAllowed() const {
return client_->GetPrefs()->GetBoolean(prefs::kSigninAllowed);
}
AccountInfo SigninManagerBase::GetAuthenticatedAccountInfo() const { AccountInfo SigninManagerBase::GetAuthenticatedAccountInfo() const {
return account_tracker_service_->GetAccountInfo(GetAuthenticatedAccountId()); return account_tracker_service_->GetAccountInfo(GetAuthenticatedAccountId());
} }
......
...@@ -90,12 +90,6 @@ class SigninManagerBase { ...@@ -90,12 +90,6 @@ class SigninManagerBase {
void Initialize(PrefService* local_state); void Initialize(PrefService* local_state);
bool IsInitialized() const; bool IsInitialized() const;
// Returns true if a signin to Chrome is allowed (by policy or pref).
// TODO(crbug.com/806778): this method should not be used externally,
// instead the value of the kSigninAllowed preference should be checked.
// Once all external code has been modified, this method will be removed.
virtual bool IsSigninAllowed() const;
// If a user has previously signed in (and has not signed out), this returns // If a user has previously signed in (and has not signed out), this returns
// the know information of the account. Otherwise, it returns an empty struct. // the know information of the account. Otherwise, it returns an empty struct.
AccountInfo GetAuthenticatedAccountInfo() const; AccountInfo GetAuthenticatedAccountInfo() const;
......
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