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

Unified Diff: content/browser/webui/url_data_manager_backend.cc

Issue 2002633002: PlzNavigate: fix issue preventing navigations to WebUIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/url_data_manager_backend.cc
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc
index fe1015f87e445c77ae396386df9182b94fc81cd0..866560760d7ce891c10dc72126e07232df42c96d 100644
--- a/content/browser/webui/url_data_manager_backend.cc
+++ b/content/browser/webui/url_data_manager_backend.cc
@@ -35,6 +35,7 @@
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/resource_request_info.h"
+#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/url_constants.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -272,7 +273,9 @@ void URLRequestChromeJob::Start() {
bool is_renderer_request = ResourceRequestInfo::GetRenderFrameForRequest(
request_, &render_process_id, &unused);
- if (!is_renderer_request) {
+ if (!is_renderer_request ||
+ (render_process_id == -1 && IsBrowserSideNavigationEnabled())) {
+ // PlzNavigate: no navigation to a WebUI is coming from a renderer.
Charlie Reis 2016/05/20 18:50:32 Hmm. This is only a safe change for PlzNavigate i
clamy 2016/05/23 14:21:21 There's one place in the NavigationRequest where w
StartAsync(true);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698