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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 2653783003: Fix front-end host creation upon navigation (Closed)
Patch Set: Created 3 years, 11 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/url_constants.cc ('k') | chrome/browser/ui/webui/devtools_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index 7f3886a4ea991961c4939069352a719dc38588ae..b75d7a081926e530389f99d2361fb6b22e02aaa4 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -13,6 +13,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "chrome/browser/about_flags.h"
+#include "chrome/browser/devtools/devtools_ui_bindings.h"
#include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
#include "chrome/browser/engagement/site_engagement_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -517,9 +518,11 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<VrShellUIUI>;
#endif
#else
- if (url.SchemeIs(content::kChromeDevToolsScheme))
+ if (url.SchemeIs(content::kChromeDevToolsScheme)) {
+ if (!DevToolsUIBindings::IsValidFrontendURL(url))
+ return nullptr;
return &NewWebUI<DevToolsUI>;
-
+ }
// chrome://inspect isn't supported on Android nor iOS. Page debugging is
// handled by a remote devtools on the host machine, and other elements, i.e.
// extensions aren't supported.
« no previous file with comments | « chrome/browser/devtools/url_constants.cc ('k') | chrome/browser/ui/webui/devtools_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698