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 7878b2574b6f1549a0723cbe1da206a86963382f..42c4f213e1f4ac7e4908210d42224b299ef57109 100644 |
| --- a/chrome/browser/browser_about_handler.cc |
| +++ b/chrome/browser/browser_about_handler.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/strings/string_util.h" |
| #include "chrome/browser/lifetime/application_lifetime.h" |
| #include "chrome/browser/ui/browser_dialogs.h" |
| +#include "chrome/common/chrome_switches.h" |
| #include "chrome/common/url_constants.h" |
| #include "components/url_fixer/url_fixer.h" |
| @@ -59,12 +60,22 @@ bool WillHandleBrowserAboutURL(GURL* url, |
| #endif |
| // Redirect chrome://settings |
| } else if (host == chrome::kChromeUISettingsHost) { |
| - host = chrome::kChromeUIUberHost; |
| - path = chrome::kChromeUISettingsHost + url->path(); |
| + if (::switches::AboutInSettingsEnabled()) { |
| + host = chrome::kChromeUISettingsFrameHost; |
|
michaelpg
2014/08/07 08:17:07
So, this makes chrome://settings load the settings
michaelpg
2014/08/07 19:33:48
I think I'm being dumb, since we're loading resour
|
| + } else { |
| + host = chrome::kChromeUIUberHost; |
| + path = chrome::kChromeUISettingsHost + url->path(); |
| + } |
| // Redirect chrome://help |
| } else if (host == chrome::kChromeUIHelpHost) { |
| - host = chrome::kChromeUIUberHost; |
| - path = chrome::kChromeUIHelpHost + url->path(); |
| + if (::switches::AboutInSettingsEnabled()) { |
| + host = chrome::kChromeUISettingsFrameHost; |
| + if (url->path().empty() || url->path() == std::string("/")) |
|
Dan Beam
2014/08/07 22:36:16
why do you need std::string()?
michaelpg
2014/08/08 01:10:46
Done.
|
| + path = chrome::kChromeUIHelpHost; |
| + } else { |
| + host = chrome::kChromeUIUberHost; |
| + path = chrome::kChromeUIHelpHost + url->path(); |
| + } |
| } |
| GURL::Replacements replacements; |