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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_ui.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: Created 4 years, 7 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/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 =

Powered by Google App Engine
This is Rietveld 408576698