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

Side by Side 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: 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 #include "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInstantProcess)) 837 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInstantProcess))
838 return true; 838 return true;
839 839
840 // For now, we skip the rest for POST submissions. This is because 840 // For now, we skip the rest for POST submissions. This is because
841 // http://crbug.com/101395 is more likely to cause compatibility issues 841 // http://crbug.com/101395 is more likely to cause compatibility issues
842 // with hosted apps and extensions than WebUI pages. We will remove this 842 // with hosted apps and extensions than WebUI pages. We will remove this
843 // check when cross-process POST submissions are supported. 843 // check when cross-process POST submissions are supported.
844 if (http_method != "GET") 844 if (http_method != "GET")
845 return false; 845 return false;
846 846
847 // If this is the Signin process, fork all navigations originating from the
848 // renderer. The destination page will then be bucketed back to this Signin
849 // process if it is a Signin url, or to another process if not.
Charlie Reis 2013/03/04 19:22:24 Yeah, I suppose there's no easy way to check wheth
tim (not reviewing) 2013/03/04 23:40:19 I added a CHECK to my if-block to ensure we never
850 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSigninProcess))
851 return true;
852
847 // If |url| matches one of the prerendered URLs, stop this navigation and try 853 // If |url| matches one of the prerendered URLs, stop this navigation and try
848 // to swap in the prerendered page on the browser process. If the prerendered 854 // to swap in the prerendered page on the browser process. If the prerendered
849 // page no longer exists by the time the OpenURL IPC is handled, a normal 855 // page no longer exists by the time the OpenURL IPC is handled, a normal
850 // navigation is attempted. 856 // navigation is attempted.
851 if (prerender_dispatcher_.get() && prerender_dispatcher_->IsPrerenderURL(url)) 857 if (prerender_dispatcher_.get() && prerender_dispatcher_->IsPrerenderURL(url))
852 return true; 858 return true;
853 859
854 const ExtensionSet* extensions = extension_dispatcher_->extensions(); 860 const ExtensionSet* extensions = extension_dispatcher_->extensions();
855 861
856 // Determine if the new URL is an extension (excluding bookmark apps). 862 // Determine if the new URL is an extension (excluding bookmark apps).
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 } 1085 }
1080 1086
1081 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 1087 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
1082 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 1088 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
1083 #if defined(ENABLE_PLUGINS) 1089 #if defined(ENABLE_PLUGINS)
1084 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 1090 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
1085 #endif 1091 #endif
1086 } 1092 }
1087 1093
1088 } // namespace chrome 1094 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698