Chromium Code Reviews| Index: chrome/browser/browser_about_handler.cc |
| diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc |
| index 3c588812980aa092aca5ba65b62d902168e46ca7..8ecad6cd93f751b406fb3853377f6c6b0ac30047 100644 |
| --- a/chrome/browser/browser_about_handler.cc |
| +++ b/chrome/browser/browser_about_handler.cc |
| @@ -95,24 +95,24 @@ bool WillHandleBrowserAboutURL(GURL* url, |
| #endif |
| // Redirect chrome://settings, unless MD settings is enabled. |
| } else if (host == chrome::kChromeUISettingsHost) { |
| - if (::switches::AboutInSettingsEnabled()) { |
| - host = chrome::kChromeUISettingsFrameHost; |
| - } else if (base::FeatureList::IsEnabled( |
| - features::kMaterialDesignSettingsFeature)) { |
| + if (base::FeatureList::IsEnabled( |
| + features::kMaterialDesignSettingsFeature)) { |
| return true; // Prevent further rewriting - this is a valid URL. |
| + } else if (::switches::AboutInSettingsEnabled()) { |
|
Lei Zhang
2016/06/21 07:54:00
There's no need for an else after a return.
michaelpg
2016/06/21 19:19:33
the whole file, including this line before my patc
Lei Zhang
2016/06/21 19:30:58
gahhhhhhhh. Fix later.
|
| + host = chrome::kChromeUISettingsFrameHost; |
| } else { |
| host = chrome::kChromeUIUberHost; |
| path = chrome::kChromeUISettingsHost + url->path(); |
| } |
| // Redirect chrome://help, unless MD settings is enabled. |
| } else if (host == chrome::kChromeUIHelpHost) { |
| - if (::switches::AboutInSettingsEnabled()) { |
| + if (base::FeatureList::IsEnabled( |
| + features::kMaterialDesignSettingsFeature)) { |
| + return true; // Prevent further rewriting - this is a valid URL. |
|
michaelpg
2016/06/21 03:17:47
note the change from patch 3 -- there's no need to
|
| + } else 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(); |