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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 2034473003: [MD History] Disable MD History for supervised users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hide_search_bar
Patch Set: fix android Created 4 years, 6 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 | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler.cc
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 04274b19630444720285912579e02d40cfcc37a8..d5966604920a4b8f119c9e31023068dbac407777 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -14,12 +14,17 @@
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "components/url_formatter/url_fixer.h"
+#if !defined(OS_ANDROID)
+#include "chrome/browser/ui/webui/md_history_ui.h"
+#endif
+
bool FixupBrowserAboutURL(GURL* url,
content::BrowserContext* browser_context) {
// Ensure that any cleanup done by FixupURL happens before the rewriting
@@ -73,21 +78,21 @@ bool WillHandleBrowserAboutURL(GURL* url,
path = chrome::kChromeUIExtensionsHost;
// Redirect chrome://history.
} else if (host == chrome::kChromeUIHistoryHost) {
+#if defined(OS_ANDROID)
+ // On Android, redirect directly to chrome://history-frame since
+ // uber page is unsupported.
+ host = chrome::kChromeUIHistoryFrameHost;
+#else
// Material design history is handled on the top-level chrome://history
// host.
- if (base::FeatureList::IsEnabled(features::kMaterialDesignHistoryFeature)) {
+ if (MdHistoryUI::IsEnabled(Profile::FromBrowserContext(browser_context))) {
host = chrome::kChromeUIHistoryHost;
path = url->path();
} else {
-#if defined(OS_ANDROID)
- // On Android, redirect directly to chrome://history-frame since
- // uber page is unsupported.
- host = chrome::kChromeUIHistoryFrameHost;
-#else
host = chrome::kChromeUIUberHost;
path = chrome::kChromeUIHistoryHost + url->path();
-#endif
}
+#endif
// Redirect chrome://settings
} else if (host == chrome::kChromeUISettingsHost) {
if (::switches::AboutInSettingsEnabled()) {
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698