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

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

Issue 12374007: signin: force web signin flow initiated visits to accounts.google.com to their own process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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. When a user is signed in, a ClientLogin 6 // which user is signed in. When a user is signed in, a ClientLogin
7 // request is run on their behalf. Auth tokens are fetched from Google 7 // request is run on their behalf. Auth tokens are fetched from Google
8 // and the results are stored in the TokenService. 8 // and the results are stored in the TokenService.
9 // 9 //
10 // **NOTE** on semantics of SigninManager: 10 // **NOTE** on semantics of SigninManager:
(...skipping 22 matching lines...) Expand all
33 #include "content/public/browser/notification_registrar.h" 33 #include "content/public/browser/notification_registrar.h"
34 #include "google_apis/gaia/gaia_auth_consumer.h" 34 #include "google_apis/gaia/gaia_auth_consumer.h"
35 #include "google_apis/gaia/google_service_auth_error.h" 35 #include "google_apis/gaia/google_service_auth_error.h"
36 #include "net/cookies/canonical_cookie.h" 36 #include "net/cookies/canonical_cookie.h"
37 37
38 class CookieSettings; 38 class CookieSettings;
39 class GaiaAuthFetcher; 39 class GaiaAuthFetcher;
40 class PrefService; 40 class PrefService;
41 class SigninGlobalError; 41 class SigninGlobalError;
42 42
43 namespace content {
44 class RenderProcessHost;
45 }
46
43 namespace policy { 47 namespace policy {
44 class CloudPolicyClient; 48 class CloudPolicyClient;
45 } 49 }
46 50
47 // Details for the Notification type GOOGLE_SIGNIN_SUCCESSFUL. 51 // Details for the Notification type GOOGLE_SIGNIN_SUCCESSFUL.
48 // A listener might use this to make note of a username / password 52 // A listener might use this to make note of a username / password
49 // pair for encryption keys. 53 // pair for encryption keys.
50 struct GoogleServiceSigninSuccessDetails { 54 struct GoogleServiceSigninSuccessDetails {
51 GoogleServiceSigninSuccessDetails(const std::string& in_username, 55 GoogleServiceSigninSuccessDetails(const std::string& in_username,
52 const std::string& in_password) 56 const std::string& in_password)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // ProfileKeyedService implementation. 192 // ProfileKeyedService implementation.
189 virtual void Shutdown() OVERRIDE; 193 virtual void Shutdown() OVERRIDE;
190 194
191 // Tells the SigninManager to prohibit signout for this profile. 195 // Tells the SigninManager to prohibit signout for this profile.
192 void ProhibitSignout(); 196 void ProhibitSignout();
193 197
194 // If true, signout is prohibited for this profile (calls to SignOut() are 198 // If true, signout is prohibited for this profile (calls to SignOut() are
195 // ignored). 199 // ignored).
196 bool IsSignoutProhibited() const; 200 bool IsSignoutProhibited() const;
197 201
202 void SetSigninProcess(const content::RenderProcessHost* process);
203 bool IsSigninProcess(const content::RenderProcessHost* process) const;
Roger Tawa OOO till Jul 10th 2013/02/28 04:07:42 Any reason to pass RenderProcessHost* instead of j
Charlie Reis 2013/02/28 17:33:02 Yes, I think the ID would be sufficient here, and
204
198 protected: 205 protected:
199 // Weak pointer to parent profile (protected so FakeSigninManager can access 206 // Weak pointer to parent profile (protected so FakeSigninManager can access
200 // it). 207 // it).
201 Profile* profile_; 208 Profile* profile_;
202 209
203 // Used to show auth errors in the wrench menu. The SigninGlobalError is 210 // Used to show auth errors in the wrench menu. The SigninGlobalError is
204 // different than most GlobalErrors in that its lifetime is controlled by 211 // different than most GlobalErrors in that its lifetime is controlled by
205 // SigninManager (so we can expose a reference for use in the wrench menu). 212 // SigninManager (so we can expose a reference for use in the wrench menu).
206 scoped_ptr<SigninGlobalError> signin_global_error_; 213 scoped_ptr<SigninGlobalError> signin_global_error_;
207 214
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // with credentials. These will be passed to TokenService so that it does 331 // with credentials. These will be passed to TokenService so that it does
325 // not need to mint new ones. 332 // not need to mint new ones.
326 ClientOAuthResult temp_oauth_login_tokens_; 333 ClientOAuthResult temp_oauth_login_tokens_;
327 334
328 // The list of SigninDiagnosticObservers. 335 // The list of SigninDiagnosticObservers.
329 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> 336 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true>
330 signin_diagnostics_observers_; 337 signin_diagnostics_observers_;
331 338
332 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; 339 base::WeakPtrFactory<SigninManager> weak_pointer_factory_;
333 340
341 int signin_process_id_;
334 342
335 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) 343 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS)
336 // CloudPolicyClient reference we keep while determining whether to create 344 // CloudPolicyClient reference we keep while determining whether to create
337 // a new profile for an enterprise user or not. 345 // a new profile for an enterprise user or not.
338 scoped_ptr<policy::CloudPolicyClient> policy_client_; 346 scoped_ptr<policy::CloudPolicyClient> policy_client_;
339 #endif 347 #endif
340 348
341 DISALLOW_COPY_AND_ASSIGN(SigninManager); 349 DISALLOW_COPY_AND_ASSIGN(SigninManager);
342 }; 350 };
343 351
344 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ 352 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698