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

Side by Side Diff: chrome/browser/signin/signin_manager.h

Issue 192313002: Make ChromeSigninClient a BrowserContextKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The signin manager encapsulates some functionality tracking 5 // The signin manager encapsulates some functionality tracking
6 // which user is signed in. See SigninManagerBase for full description of 6 // which user is signed in. See SigninManagerBase for full description of
7 // responsibilities. The class defined in this file provides functionality 7 // responsibilities. The class defined in this file provides functionality
8 // required by all platforms except Chrome OS. 8 // required by all platforms except Chrome OS.
9 // 9 //
10 // When a user is signed in, a ClientLogin request is run on their behalf. 10 // When a user is signed in, a ClientLogin request is run on their behalf.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // isolated, privileged signin process. 63 // isolated, privileged signin process.
64 static bool IsWebBasedSigninFlowURL(const GURL& url); 64 static bool IsWebBasedSigninFlowURL(const GURL& url);
65 65
66 // This is used to distinguish URLs belonging to the special web signin flow 66 // This is used to distinguish URLs belonging to the special web signin flow
67 // running in the special signin process from other URLs on the same domain. 67 // running in the special signin process from other URLs on the same domain.
68 // We do not grant WebUI privilieges / bindings to this process or to URLs of 68 // We do not grant WebUI privilieges / bindings to this process or to URLs of
69 // this scheme; enforcement of privileges is handled separately by 69 // this scheme; enforcement of privileges is handled separately by
70 // OneClickSigninHelper. 70 // OneClickSigninHelper.
71 static const char* kChromeSigninEffectiveSite; 71 static const char* kChromeSigninEffectiveSite;
72 72
73 explicit SigninManager(scoped_ptr<SigninClient> client); 73 explicit SigninManager(SigninClient* client);
74 virtual ~SigninManager(); 74 virtual ~SigninManager();
75 75
76 // Returns true if the username is allowed based on the policy string. 76 // Returns true if the username is allowed based on the policy string.
77 static bool IsUsernameAllowedByPolicy(const std::string& username, 77 static bool IsUsernameAllowedByPolicy(const std::string& username,
78 const std::string& policy); 78 const std::string& policy);
79 79
80 // Attempt to sign in this user with existing credentials from the cookie jar. 80 // Attempt to sign in this user with existing credentials from the cookie jar.
81 // |session_index| indicates which user account to use if the cookie jar 81 // |session_index| indicates which user account to use if the cookie jar
82 // contains a multi-login session. Otherwise the end result of this call is 82 // contains a multi-login session. Otherwise the end result of this call is
83 // the same as StartSignIn(). 83 // the same as StartSignIn().
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // by ID, if there is one. 279 // by ID, if there is one.
280 int signin_host_id_; 280 int signin_host_id_;
281 281
282 // The RenderProcessHosts being observed. 282 // The RenderProcessHosts being observed.
283 std::set<content::RenderProcessHost*> signin_hosts_observed_; 283 std::set<content::RenderProcessHost*> signin_hosts_observed_;
284 284
285 // Callback invoked during signin after an OAuth token has been fetched 285 // Callback invoked during signin after an OAuth token has been fetched
286 // but before signin is complete. 286 // but before signin is complete.
287 OAuthTokenFetchedCallback oauth_token_fetched_callback_; 287 OAuthTokenFetchedCallback oauth_token_fetched_callback_;
288 288
289 scoped_ptr<SigninClient> client_; 289 // The SigninClient object associated with this object. Must outlive this
290 // object.
291 SigninClient* client_;
290 292
291 // Helper object to listen for changes to signin preferences stored in non- 293 // Helper object to listen for changes to signin preferences stored in non-
292 // profile-specific local prefs (like kGoogleServicesUsernamePattern). 294 // profile-specific local prefs (like kGoogleServicesUsernamePattern).
293 PrefChangeRegistrar local_state_pref_registrar_; 295 PrefChangeRegistrar local_state_pref_registrar_;
294 296
295 // Helper object to listen for changes to the signin allowed preference. 297 // Helper object to listen for changes to the signin allowed preference.
296 BooleanPrefMember signin_allowed_; 298 BooleanPrefMember signin_allowed_;
297 299
298 // Helper to merge signed in account into the content area. 300 // Helper to merge signed in account into the content area.
299 scoped_ptr<MergeSessionHelper> merge_session_helper_; 301 scoped_ptr<MergeSessionHelper> merge_session_helper_;
300 302
301 DISALLOW_COPY_AND_ASSIGN(SigninManager); 303 DISALLOW_COPY_AND_ASSIGN(SigninManager);
302 }; 304 };
303 305
304 #endif // !defined(OS_CHROMEOS) 306 #endif // !defined(OS_CHROMEOS)
305 307
306 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ 308 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_
OLDNEW
« 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