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

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

Issue 2352553002: [MD History] Run MD History on chrome://chrome/history. (Closed)
Patch Set: Created 4 years, 3 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/resources/vulcanize.py ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('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 b5220b360faee6e2cec3b568d026aa081bdabeb9..a57ad0b96521459196513b343b12156db991e729 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -1,7 +1,7 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+#include "base/debug/stack_trace.h"
#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
#include <stddef.h>
@@ -434,7 +434,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
}
// Material Design history is on its own host, rather than on an Uber page.
if (MdHistoryUI::IsEnabled(profile) &&
- url.host() == chrome::kChromeUIHistoryHost) {
+ url.host() == chrome::kChromeUIUberHost &&
+ url.path().find("/" + std::string(chrome::kChromeUIHistoryHost)) == 0) {
return &NewWebUI<MdHistoryUI>;
}
// Material Design Settings gets its own host, if enabled.
@@ -460,8 +461,9 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
if (url.host() == chrome::kChromeUIUberFrameHost)
return &NewWebUI<UberFrameUI>;
// Uber page is not used on Android.
- if (url.host() == chrome::kChromeUIUberHost)
+ if (url.host() == chrome::kChromeUIUberHost) {
return &NewWebUI<UberUI>;
+ }
#endif // !defined(OS_ANDROID)
#if defined(OS_WIN)
if (url.host() == chrome::kChromeUIConflictsHost)
« no previous file with comments | « chrome/browser/resources/vulcanize.py ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698