Chromium Code Reviews| Index: chrome/browser/signin/signin_manager_base.h |
| diff --git a/chrome/browser/signin/signin_manager_base.h b/chrome/browser/signin/signin_manager_base.h |
| index cca866e2df6b2d2360011935f8044e45d1627903..e2c791ab075eb3403f9075b1588abc823217e5ea 100644 |
| --- a/chrome/browser/signin/signin_manager_base.h |
| +++ b/chrome/browser/signin/signin_manager_base.h |
| @@ -67,28 +67,19 @@ class SigninManagerBase : public ProfileKeyedService { |
| static bool AreSigninCookiesAllowed(Profile* profile); |
| static bool AreSigninCookiesAllowed(CookieSettings* cookie_settings); |
| - // Returns true if the username is allowed based on the policy string. |
| - static bool IsAllowedUsername(const std::string& username, |
| - const std::string& policy); |
| - |
| SigninManagerBase(); |
| virtual ~SigninManagerBase(); |
| // If user was signed in, load tokens from DB if available. |
| - void Initialize(Profile* profile); |
| + virtual void Initialize(Profile* profile); |
| bool IsInitialized() const; |
| - // Returns true if the passed username is allowed by policy. Virtual for |
| - // mocking in tests. |
| - virtual bool IsAllowedUsername(const std::string& username) const; |
| - |
| // Returns true if a signin to Chrome is allowed (by policy or pref). |
| - bool IsSigninAllowed() const; |
| - |
| - // Checks if signin is allowed for the profile that owns |io_data|. This must |
| - // be invoked on the IO thread, and can be used to check if signin is enabled |
| - // on that thread. |
| - static bool IsSigninAllowedOnIOThread(ProfileIOData* io_data); |
| + // TODO(tim): If the kSigninAllowed pref was non-Chrome OS-only, this |
|
Andrew T Wilson (Slow)
2013/05/06 09:06:00
I'm confused by this comment. I believe that kSign
tim (not reviewing)
2013/05/06 17:28:57
Done. Using bug 174927.
|
| + // method wouldn't be needed, but as is we provide this method to let all |
| + // interested code query the value in one way, versus half using PrefService |
| + // directly and the other half using SigninManager. |
| + virtual bool IsSigninAllowed() const; |
| // If a user has previously established a username and SignOut has not been |
| // called, this will return the username. |
| @@ -101,12 +92,6 @@ class SigninManagerBase : public ProfileKeyedService { |
| // (by platform / depending on StartBehavior). Bug 88109. |
| void SetAuthenticatedUsername(const std::string& username); |
| - // Sign a user out, removing the preference, erasing all keys |
| - // associated with the user, and canceling all auth in progress. |
| - // TODO(tim): Remove SignOut here, it belongs in the derived class. |
| - // Bug 174927. |
| - virtual void SignOut(); |
| - |
| // Returns true if there's a signin in progress. |
| virtual bool AuthInProgress() const; |
| @@ -131,6 +116,8 @@ class SigninManagerBase : public ProfileKeyedService { |
| // Lets different platforms initialize TokenService in their own way. |
| virtual void InitTokenService(); |
| + void clear_authenticated_username(); |
|
Andrew T Wilson (Slow)
2013/05/06 09:06:00
Should document here why one would call this and n
tim (not reviewing)
2013/05/06 17:28:57
Done.
|
| + |
| // Pointer to parent profile (protected so FakeSigninManager can access |
| // it). |
| Profile* profile_; |
| @@ -151,16 +138,6 @@ class SigninManagerBase : public ProfileKeyedService { |
| private: |
| friend class FakeSigninManagerBase; |
| friend class FakeSigninManager; |
| - void OnGoogleServicesUsernamePatternChanged(); |
| - |
| - void OnSigninAllowedPrefChanged(); |
| - |
| - // Helper object to listen for changes to signin preferences stored in non- |
| - // profile-specific local prefs (like kGoogleServicesUsernamePattern). |
| - PrefChangeRegistrar local_state_pref_registrar_; |
| - |
| - // Helper object to listen for changes to the signin allowed preference. |
| - BooleanPrefMember signin_allowed_; |
| // Actual username after successful authentication. |
| std::string authenticated_username_; |