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

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

Issue 205703005: Componentize SigninIdAccountHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 25 matching lines...) Expand all
36 #include "chrome/browser/signin/signin_manager_base.h" 36 #include "chrome/browser/signin/signin_manager_base.h"
37 #include "components/keyed_service/core/keyed_service.h" 37 #include "components/keyed_service/core/keyed_service.h"
38 #include "content/public/browser/render_process_host_observer.h" 38 #include "content/public/browser/render_process_host_observer.h"
39 #include "google_apis/gaia/google_service_auth_error.h" 39 #include "google_apis/gaia/google_service_auth_error.h"
40 #include "google_apis/gaia/merge_session_helper.h" 40 #include "google_apis/gaia/merge_session_helper.h"
41 #include "net/cookies/canonical_cookie.h" 41 #include "net/cookies/canonical_cookie.h"
42 42
43 class CookieSettings; 43 class CookieSettings;
44 class ProfileIOData; 44 class ProfileIOData;
45 class PrefService; 45 class PrefService;
46 class SigninAccountIdHelper;
47 class SigninClient; 46 class SigninClient;
48 47
49 class SigninManager : public SigninManagerBase, 48 class SigninManager : public SigninManagerBase,
50 public content::RenderProcessHostObserver { 49 public content::RenderProcessHostObserver {
51 public: 50 public:
52 // The callback invoked once the OAuth token has been fetched during signin, 51 // The callback invoked once the OAuth token has been fetched during signin,
53 // but before the profile transitions to the "signed-in" state. This allows 52 // but before the profile transitions to the "signed-in" state. This allows
54 // callers to load policy and prompt the user appropriately before completing 53 // callers to load policy and prompt the user appropriately before completing
55 // signin. The callback is passed the just-fetched OAuth login refresh token. 54 // signin. The callback is passed the just-fetched OAuth login refresh token.
56 typedef base::Callback<void(const std::string&)> OAuthTokenFetchedCallback; 55 typedef base::Callback<void(const std::string&)> OAuthTokenFetchedCallback;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // transient signin data. 197 // transient signin data.
199 void HandleAuthError(const GoogleServiceAuthError& error); 198 void HandleAuthError(const GoogleServiceAuthError& error);
200 199
201 void OnSigninAllowedPrefChanged(); 200 void OnSigninAllowedPrefChanged();
202 void OnGoogleServicesUsernamePatternChanged(); 201 void OnGoogleServicesUsernamePatternChanged();
203 202
204 // ClientLogin identity. 203 // ClientLogin identity.
205 std::string possibly_invalid_username_; 204 std::string possibly_invalid_username_;
206 std::string password_; // This is kept empty whenever possible. 205 std::string password_; // This is kept empty whenever possible.
207 206
208 // Fetcher for the obfuscated user id.
209 scoped_ptr<SigninAccountIdHelper> account_id_helper_;
210
211 // The type of sign being performed. This value is valid only between a call 207 // The type of sign being performed. This value is valid only between a call
212 // to one of the StartSigninXXX methods and when the sign in is either 208 // to one of the StartSigninXXX methods and when the sign in is either
213 // successful or not. 209 // successful or not.
214 SigninType type_; 210 SigninType type_;
215 211
216 // Temporarily saves the oauth2 refresh token. It will be passed to the 212 // Temporarily saves the oauth2 refresh token. It will be passed to the
217 // token service so that it does not need to mint new ones. 213 // token service so that it does not need to mint new ones.
218 std::string temp_refresh_token_; 214 std::string temp_refresh_token_;
219 215
220 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; 216 base::WeakPtrFactory<SigninManager> weak_pointer_factory_;
(...skipping 18 matching lines...) Expand all
239 235
240 // Helper to merge signed in account into the content area. 236 // Helper to merge signed in account into the content area.
241 scoped_ptr<MergeSessionHelper> merge_session_helper_; 237 scoped_ptr<MergeSessionHelper> merge_session_helper_;
242 238
243 DISALLOW_COPY_AND_ASSIGN(SigninManager); 239 DISALLOW_COPY_AND_ASSIGN(SigninManager);
244 }; 240 };
245 241
246 #endif // !defined(OS_CHROMEOS) 242 #endif // !defined(OS_CHROMEOS)
247 243
248 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ 244 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698