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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/signin_manager.h
diff --git a/chrome/browser/signin/signin_manager.h b/chrome/browser/signin/signin_manager.h
index 2272c7acc0d17dc479fdf403ea2052941bd8b484..f65c96b0a88a294f7bd9a1c15f9482d6bc921654 100644
--- a/chrome/browser/signin/signin_manager.h
+++ b/chrome/browser/signin/signin_manager.h
@@ -195,6 +195,15 @@ class SigninManager : public GaiaAuthConsumer,
// ignored).
bool IsSignoutProhibited() const;
+ // Allows the SigninManager to track the privileged signin process
+ // identified by |process_id| so that we can later ask (via IsSigninProcess)
+ // if it is safe to sign the user in from the current context (see
+ // OneClickSigninHelper). All of this tracking state is reset once the
+ // renderer process terminates.
+ void SetSigninProcess(int process_id);
+ bool IsSigninProcess(int process_id) const;
+ bool HasSigninProcess() const;
+
protected:
// Weak pointer to parent profile (protected so FakeSigninManager can access
// it).
@@ -331,6 +340,9 @@ class SigninManager : public GaiaAuthConsumer,
base::WeakPtrFactory<SigninManager> weak_pointer_factory_;
+ // See SetSigninProcess. Tracks the currently active signin process
+ // by ID, if there is one.
+ int signin_process_id_;
#if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS)
// CloudPolicyClient reference we keep while determining whether to create

Powered by Google App Engine
This is Rietveld 408576698