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

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 nit 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
« no previous file with comments | « chrome/common/url_constants.cc ('k') | chrome/test/base/chrome_render_view_host_test_harness.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
darin (slow to review) 2013/03/05 07:29:56 nit: I'm confused by this comment. It seems like
tim (not reviewing) 2013/03/05 09:45:25 You're right, because the if-statement on line 844
+ // 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
« no previous file with comments | « chrome/common/url_constants.cc ('k') | chrome/test/base/chrome_render_view_host_test_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698