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

Unified Diff: chrome/browser/search/local_ntp_source.cc

Issue 447033002: [Local NTP] Modify config.js to contain a specifier for NTP design. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change of name Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/local_ntp_source.cc
diff --git a/chrome/browser/search/local_ntp_source.cc b/chrome/browser/search/local_ntp_source.cc
index 35cae35f877191b4d51b30b815d7498a9a573728..f9fefbe12acec839ce3d2f12b6c3a9e8e6d12b97 100644
--- a/chrome/browser/search/local_ntp_source.cc
+++ b/chrome/browser/search/local_ntp_source.cc
@@ -35,8 +35,8 @@ namespace {
const char kMaterialDesignNTPFieldTrialName[] = "MaterialDesignNTP";
const char kMaterialDesignNTPFieldTrialEnabledPrefix[] = "Enabled";
-// Class name to be used for the new design in local resources.
-const char kMaterialDesignNTPClassName[] = "md";
+// Name to be used for the new design in local resources.
+const char kMaterialDesignNTPName[] = "md";
// Signifies a locally constructed resource, i.e. not from grit/.
const int kLocalResource = -1;
@@ -127,6 +127,11 @@ std::string GetConfigData(Profile* profile) {
config_data.SetBoolean("isGooglePage",
DefaultSearchProviderIsGoogle(profile) &&
chrome::ShouldShowGoogleLocalNTP());
+ if (IsMaterialDesignEnabled()) {
+ scoped_ptr<base::Value> design_value(
+ new base::StringValue(kMaterialDesignNTPName));
+ config_data.Set("ntpDesignName", design_value.release());
+ }
// Serialize the dictionary.
std::string js_text;
@@ -171,7 +176,7 @@ void LocalNtpSource::StartDataRequest(
if (stripped_path == kLocalNTPFilename) {
SendResourceWithClass(
IDR_LOCAL_NTP_HTML,
- IsMaterialDesignEnabled() ? kMaterialDesignNTPClassName : "",
+ IsMaterialDesignEnabled() ? kMaterialDesignNTPName : "",
callback);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698