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

Unified Diff: content/renderer/render_view_impl.cc

Issue 12531004: Let the browser handle external navigations from DevTools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 73c4b1b69224ed0433718dd8b90638bd7eabbaac..4804e187f727e46c15c0b91d724327153e91c5cb 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3040,9 +3040,9 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
!url.SchemeIs(chrome::kAboutScheme)) {
bool send_referrer = false;
- // All navigations to WebUI URLs or within WebUI-enabled RenderProcesses
- // must be handled by the browser process so that the correct bindings and
- // data sources can be registered.
+ // All navigations to or from WebUI URLs or within WebUI-enabled
+ // RenderProcesses must be handled by the browser process so that the
+ // correct bindings and data sources can be registered.
// Similarly, navigations to view-source URLs or within ViewSource mode
// must be handled by the browser process (except for reloads - those are
// safe to leave within the renderer).
@@ -3051,7 +3051,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
// blessed with file permissions.
int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
bool is_initial_navigation = page_id_ == -1;
- bool should_fork = HasWebUIScheme(url) ||
+ bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
(cumulative_bindings & BINDINGS_POLICY_WEB_UI) ||
url.SchemeIs(chrome::kViewSourceScheme) ||
(frame->isViewSourceModeEnabled() &&
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698