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

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

Issue 1020853012: [Icons NTP] Add window.configData.useIcons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 625ab096ffd76c0cbf09eb6573a67513787e4193..3aade418a9fb93e75b7999ae37f32ee1272c8e5e 100644
--- a/chrome/browser/search/local_ntp_source.cc
+++ b/chrome/browser/search/local_ntp_source.cc
@@ -79,6 +79,11 @@ bool DefaultSearchProviderIsGoogle(Profile* profile) {
SEARCH_ENGINE_GOOGLE);
}
+// Returns whether icon NTP is enabled.
+bool IsIconNTPEnabled() {
+ return StartsWithASCII(base::FieldTrialList::FindFullName("IconNTP"),
+ "Enabled", true);
+}
Mathieu 2015/03/25 13:36:39 missing newline
huangs 2015/03/25 14:10:29 Done.
// Returns whether we are in the Fast NTP experiment or not.
bool IsLocalNTPFastEnabled() {
return StartsWithASCII(base::FieldTrialList::FindFullName("LocalNTPFast"),
@@ -140,6 +145,7 @@ std::string GetConfigData(Profile* profile) {
config_data.Set("translatedStrings",
GetTranslatedStrings(is_google).release());
config_data.SetBoolean("isGooglePage", is_google);
+ config_data.SetBoolean("useIcons", IsIconNTPEnabled());
// Serialize the dictionary.
std::string js_text;
« 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