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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

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: review 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/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 0a28d0f0c00f5433041fbf7d1d05e903ae5ff555..d4a65fdcc46ea27b0ca7ad04e5ee53bbf6be4f05 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -844,6 +844,17 @@ bool ChromeContentRendererClient::ShouldFork(WebFrame* frame,
if (http_method != "GET")
return false;
+ // If this is the Signin process, fork all navigations originating from the
+ // renderer. The destination page will then be bucketed back to this Signin
+ // process if it is a Signin url, or to another process if not.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSigninProcess)) {
+ // We explicitly do this *after* checking that http_method is not POST,
+ // because we don't want to allow non-signin pages to fork-on-POST to a
+ // signin-related action URL.
+ CHECK_NE(http_method, "POST");
+ return true;
+ }
+
// If |url| matches one of the prerendered URLs, stop this navigation and try
// to swap in the prerendered page on the browser process. If the prerendered
// page no longer exists by the time the OpenURL IPC is handled, a normal

Powered by Google App Engine
This is Rietveld 408576698