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

Unified Diff: chrome/browser/signin/signin_manager.h

Issue 216493003: Abstract most Profile knowledge from SigninManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix after rebase Created 6 years, 9 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/signin/fake_signin_manager.cc ('k') | chrome/browser/signin/signin_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager.h
diff --git a/chrome/browser/signin/signin_manager.h b/chrome/browser/signin/signin_manager.h
index 78e4f8577f6aa4ad2a98b7515f0522ae07721384..258c97cac01b5f4b6e46d747b28770f34ab78885 100644
--- a/chrome/browser/signin/signin_manager.h
+++ b/chrome/browser/signin/signin_manager.h
@@ -31,7 +31,6 @@
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
#include "base/prefs/pref_member.h"
-#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/signin/core/browser/signin_internals_util.h"
#include "components/signin/core/browser/signin_manager_base.h"
@@ -40,6 +39,7 @@
#include "net/cookies/canonical_cookie.h"
class PrefService;
+class ProfileOAuth2TokenService;
class SigninAccountIdHelper;
class SigninClient;
@@ -62,7 +62,7 @@ class SigninManager : public SigninManagerBase {
// OneClickSigninHelper.
static const char kChromeSigninEffectiveSite[];
- explicit SigninManager(SigninClient* client);
+ SigninManager(SigninClient* client, ProfileOAuth2TokenService* token_service);
virtual ~SigninManager();
// Returns true if the username is allowed based on the policy string.
@@ -115,9 +115,10 @@ class SigninManager : public SigninManagerBase {
// authenticated. Returns an empty string if no auth is in progress.
const std::string& GetUsernameForAuthInProgress() const;
- // Set the profile preference to turn off one-click sign-in so that it won't
- // ever show it again in this profile (even if the user tries a new account).
- static void DisableOneClickSignIn(Profile* profile);
+ // Set the preference to turn off one-click sign-in so that it won't ever
+ // show it again for the user associated with |prefs| (even if the user tries
+ // a new account).
+ static void DisableOneClickSignIn(PrefService* prefs);
// Tells the SigninManager whether to prohibit signout for this profile.
// If |prohibit_signout| is true, then signout will be prohibited.
@@ -202,6 +203,10 @@ class SigninManager : public SigninManagerBase {
// object.
SigninClient* client_;
+ // The ProfileOAuth2TokenService instance associated with this object. Must
+ // outlive this object.
+ ProfileOAuth2TokenService* token_service_;
+
// Helper object to listen for changes to signin preferences stored in non-
// profile-specific local prefs (like kGoogleServicesUsernamePattern).
PrefChangeRegistrar local_state_pref_registrar_;
« no previous file with comments | « chrome/browser/signin/fake_signin_manager.cc ('k') | chrome/browser/signin/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698