Chromium Code Reviews| Index: chrome/browser/ui/webui/settings/md_settings_ui.cc |
| diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.cc b/chrome/browser/ui/webui/settings/md_settings_ui.cc |
| index b2ddfdec737bb9f02687f965084f2af28bc433ea..913e7b7aaea780f2c1a209cbe33c94cffe051e54 100644 |
| --- a/chrome/browser/ui/webui/settings/md_settings_ui.cc |
| +++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| +#include "base/feature_list.h" |
| #include "base/metrics/histogram_macros.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/webui/settings/about_handler.h" |
| @@ -24,6 +25,7 @@ |
| #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
| #include "chrome/browser/ui/webui/settings/settings_startup_pages_handler.h" |
| #include "chrome/browser/ui/webui/settings/site_settings_handler.h" |
| +#include "chrome/common/chrome_features.h" |
| #include "chrome/common/url_constants.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_ui.h" |
| @@ -80,8 +82,11 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui) |
| AddSettingsPageUIHandler(new SystemHandler()); |
| #endif |
| + std::string html_host = chrome::kChromeUIMdSettingsHost; |
|
groby-ooo-7-16
2016/06/01 20:46:30
Ugly, but necessary - since we use relative URLs,
|
| + if (base::FeatureList::IsEnabled(features::kMaterialDesignSettingsFeature)) |
| + html_host = chrome::kChromeUISettingsHost; |
| content::WebUIDataSource* html_source = |
| - content::WebUIDataSource::Create(chrome::kChromeUIMdSettingsHost); |
| + content::WebUIDataSource::Create(html_host); |
|
Dan Beam
2016/06/01 20:52:57
instead of |html_host|, could this web web_ui->Get
Dan Beam
2016/06/01 21:01:09
web_ui->GetWebContents()->GetVisibleUrl().host() *
groby-ooo-7-16
2016/06/01 23:29:35
Hm. I wonder if that could exploit routing problem
groby-ooo-7-16
2016/06/02 23:03:53
Tentatively done. Still feeling queasy about it.
|
| #if defined(OS_CHROMEOS) |
| chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = |