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

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: use extension-based scheme instead. 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). All of this tracking state is reset once the
202 // renderer process terminates.
203 void SetSigninProcess(int process_id);
204 bool IsSigninProcess(int process_id) const;
205 bool HasSigninProcess() const;
206
198 protected: 207 protected:
199 // Weak pointer to parent profile (protected so FakeSigninManager can access 208 // Weak pointer to parent profile (protected so FakeSigninManager can access
200 // it). 209 // it).
201 Profile* profile_; 210 Profile* profile_;
202 211
203 // Used to show auth errors in the wrench menu. The SigninGlobalError is 212 // Used to show auth errors in the wrench menu. The SigninGlobalError is
204 // different than most GlobalErrors in that its lifetime is controlled by 213 // 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). 214 // SigninManager (so we can expose a reference for use in the wrench menu).
206 scoped_ptr<SigninGlobalError> signin_global_error_; 215 scoped_ptr<SigninGlobalError> signin_global_error_;
207 216
(...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 333 // with credentials. These will be passed to TokenService so that it does
325 // not need to mint new ones. 334 // not need to mint new ones.
326 ClientOAuthResult temp_oauth_login_tokens_; 335 ClientOAuthResult temp_oauth_login_tokens_;
327 336
328 // The list of SigninDiagnosticObservers. 337 // The list of SigninDiagnosticObservers.
329 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> 338 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true>
330 signin_diagnostics_observers_; 339 signin_diagnostics_observers_;
331 340
332 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; 341 base::WeakPtrFactory<SigninManager> weak_pointer_factory_;
333 342
343 // See SetSigninProcess. Tracks the currently active signin process
344 // by ID, if there is one.
345 int signin_process_id_;
334 346
335 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) 347 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS)
336 // CloudPolicyClient reference we keep while determining whether to create 348 // CloudPolicyClient reference we keep while determining whether to create
337 // a new profile for an enterprise user or not. 349 // a new profile for an enterprise user or not.
338 scoped_ptr<policy::CloudPolicyClient> policy_client_; 350 scoped_ptr<policy::CloudPolicyClient> policy_client_;
339 #endif 351 #endif
340 352
341 DISALLOW_COPY_AND_ASSIGN(SigninManager); 353 DISALLOW_COPY_AND_ASSIGN(SigninManager);
342 }; 354 };
343 355
344 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ 356 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698