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

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: add browser test 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // ProfileKeyedService implementation. 188 // ProfileKeyedService implementation.
189 virtual void Shutdown() OVERRIDE; 189 virtual void Shutdown() OVERRIDE;
190 190
191 // Tells the SigninManager to prohibit signout for this profile. 191 // Tells the SigninManager to prohibit signout for this profile.
192 void ProhibitSignout(); 192 void ProhibitSignout();
193 193
194 // If true, signout is prohibited for this profile (calls to SignOut() are 194 // If true, signout is prohibited for this profile (calls to SignOut() are
195 // ignored). 195 // ignored).
196 bool IsSignoutProhibited() const; 196 bool IsSignoutProhibited() const;
197 197
198 // Allows the SigninManager to track the privileged signin process
199 // identified by |process_id| so that we can later ask (via IsSigninProcess)
200 // if it is safe to sign the user in from the current context (see
201 // OneClickSigninHelper).
Charlie Reis 2013/03/04 19:22:24 nit: Mention that this resets if the process termi
tim (not reviewing) 2013/03/04 23:40:19 Done.
202 void SetSigninProcess(int process_id);
203 bool IsSigninProcess(int process_id) const;
204 bool HasSigninProcess() const;
205
198 protected: 206 protected:
199 // Weak pointer to parent profile (protected so FakeSigninManager can access 207 // Weak pointer to parent profile (protected so FakeSigninManager can access
200 // it). 208 // it).
201 Profile* profile_; 209 Profile* profile_;
202 210
203 // Used to show auth errors in the wrench menu. The SigninGlobalError is 211 // Used to show auth errors in the wrench menu. The SigninGlobalError is
204 // different than most GlobalErrors in that its lifetime is controlled by 212 // 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). 213 // SigninManager (so we can expose a reference for use in the wrench menu).
206 scoped_ptr<SigninGlobalError> signin_global_error_; 214 scoped_ptr<SigninGlobalError> signin_global_error_;
207 215
(...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 332 // with credentials. These will be passed to TokenService so that it does
325 // not need to mint new ones. 333 // not need to mint new ones.
326 ClientOAuthResult temp_oauth_login_tokens_; 334 ClientOAuthResult temp_oauth_login_tokens_;
327 335
328 // The list of SigninDiagnosticObservers. 336 // The list of SigninDiagnosticObservers.
329 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> 337 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true>
330 signin_diagnostics_observers_; 338 signin_diagnostics_observers_;
331 339
332 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; 340 base::WeakPtrFactory<SigninManager> weak_pointer_factory_;
333 341
342 // See SetSigninProcess. Tracks the currently active signin process
343 // by ID, if there is one.
344 int signin_process_id_;
334 345
335 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) 346 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS)
336 // CloudPolicyClient reference we keep while determining whether to create 347 // CloudPolicyClient reference we keep while determining whether to create
337 // a new profile for an enterprise user or not. 348 // a new profile for an enterprise user or not.
338 scoped_ptr<policy::CloudPolicyClient> policy_client_; 349 scoped_ptr<policy::CloudPolicyClient> policy_client_;
339 #endif 350 #endif
340 351
341 DISALLOW_COPY_AND_ASSIGN(SigninManager); 352 DISALLOW_COPY_AND_ASSIGN(SigninManager);
342 }; 353 };
343 354
344 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ 355 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698