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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_ui.cc

Issue 2573943002: WebUI: Vulcanize MD Settings at compile time. (Closed)
Patch Set: Fix path to crisper.js to not be relative. Created 3 years, 11 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 dd6206686813b2238f0e58ee6f19e834e4ddaf85..3676c5426bfa12310e8befcf844e57e1470232a0 100644
--- a/chrome/browser/ui/webui/settings/md_settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc
@@ -180,14 +180,20 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui, const GURL& url)
// Add the metrics handler to write uma stats.
web_ui->AddMessageHandler(base::MakeUnique<MetricsHandler>());
+#if BUILDFLAG(USE_VULCANIZE)
+ html_source->AddResourcePath("crisper.js",
+ IDR_MD_SETTINGS_CRISPER_JS);
+ html_source->SetDefaultResource(IDR_MD_SETTINGS_VULCANIZED_HTML);
+#else
// Add all settings resources.
for (size_t i = 0; i < kSettingsResourcesSize; ++i) {
html_source->AddResourcePath(kSettingsResources[i].name,
kSettingsResources[i].value);
}
+ html_source->SetDefaultResource(IDR_SETTINGS_SETTINGS_HTML);
+#endif
AddLocalizedStrings(html_source, profile);
- html_source->SetDefaultResource(IDR_SETTINGS_SETTINGS_HTML);
content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
html_source);

Powered by Google App Engine
This is Rietveld 408576698