Chromium Code Reviews| 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; |