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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2913343002: Start removing deprecated Options UI code (Closed)
Patch Set: thestig@ review Created 3 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
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 2798f175d266568bf471b99d8f90f98ac3728b30..c0d10f997594580389b0aac1ea887bd62f726e99 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -658,15 +658,13 @@ bool HandleNewTabPageLocationOverride(
// Handles rewriting Web UI URLs.
bool HandleWebUI(GURL* url, content::BrowserContext* browser_context) {
- if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) {
- // Rewrite chrome://help and chrome://chrome to chrome://settings/help.
- if (url->host() == chrome::kChromeUIHelpHost ||
- (url->host() == chrome::kChromeUIUberHost &&
- (url->path().empty() || url->path() == "/"))) {
- *url = ReplaceURLHostAndPath(*url, chrome::kChromeUISettingsHost,
- chrome::kChromeUIHelpHost);
- return true; // Return true to update the displayed URL.
- }
+ // Rewrite chrome://help and chrome://chrome to chrome://settings/help.
+ if (url->host() == chrome::kChromeUIHelpHost ||
+ (url->host() == chrome::kChromeUIUberHost &&
+ (url->path().empty() || url->path() == "/"))) {
+ *url = ReplaceURLHostAndPath(*url, chrome::kChromeUISettingsHost,
+ chrome::kChromeUIHelpHost);
+ return true; // Return true to update the displayed URL.
}
// Do not handle special URLs such as "about:foo"
@@ -706,10 +704,8 @@ bool HandleWebUI(GURL* url, content::BrowserContext* browser_context) {
bool HandleWebUIReverse(GURL* url, content::BrowserContext* browser_context) {
// No need to actually reverse-rewrite the URL, but return true to update the
// displayed URL when rewriting chrome://help to chrome://settings/help.
- if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) &&
- url->host() == chrome::kChromeUISettingsHost) {
+ if (url->host() == chrome::kChromeUISettingsHost)
return true;
- }
if (!url->is_valid() || !url->SchemeIs(content::kChromeUIScheme))
return false;
« no previous file with comments | « chrome/browser/browser_about_handler_unittest.cc ('k') | chrome/browser/chrome_content_browser_client_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698