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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 2029263002: [MD Settings] Add feature to enable md-settings by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One last fix... 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/profiles/profile_window.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..93c73b9d18cf6f8f660831086b836f1a521071f6 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -88,20 +88,26 @@ bool WillHandleBrowserAboutURL(GURL* url,
path = chrome::kChromeUIHistoryHost + url->path();
#endif
}
- // Redirect chrome://settings
+ // Redirect chrome://settings, unless MD settings is enabled.
} else if (host == chrome::kChromeUISettingsHost) {
if (::switches::AboutInSettingsEnabled()) {
Nico 2016/06/10 18:41:27 this looks a bit funny -- if i enable md settings
groby-ooo-7-16 2016/06/10 20:58:17 The two flags are mutually exclusive, so any combi
host = chrome::kChromeUISettingsFrameHost;
+ } else if (base::FeatureList::IsEnabled(
+ features::kMaterialDesignSettingsFeature)) {
+ return true; // Prevent further rewriting - this is a valid URL.
} else {
host = chrome::kChromeUIUberHost;
path = chrome::kChromeUISettingsHost + url->path();
}
- // Redirect chrome://help
+ // Redirect chrome://help, unless MD settings is enabled.
} else if (host == chrome::kChromeUIHelpHost) {
if (::switches::AboutInSettingsEnabled()) {
host = chrome::kChromeUISettingsFrameHost;
if (url->path().empty() || url->path() == "/")
path = chrome::kChromeUIHelpHost;
+ } else if (base::FeatureList::IsEnabled(
+ features::kMaterialDesignSettingsFeature)) {
+ return true; // Prevent further rewriting - this is a valid URL.
} else {
host = chrome::kChromeUIUberHost;
path = chrome::kChromeUIHelpHost + url->path();
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/profiles/profile_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698