Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
index dd5c437b371f3beb5b8acb58a6e6eaf22b6f577b..7c87217dde729ede67a4c08bbf5e644538f94371 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
@@ -246,7 +246,8 @@ public class NewTabPage |
@Override |
public boolean isToolbarEnabled() { |
- return ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_TOOLBAR); |
+ return ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_TOOLBAR) |
+ && !ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS); |
} |
private void recordOpenedMostVisitedItem(MostVisitedItem item) { |
@@ -565,7 +566,9 @@ public class NewTabPage |
mProfile = tab.getProfile(); |
mTitle = activity.getResources().getString(R.string.button_new_tab); |
- mBackgroundColor = ApiCompatibilityUtils.getColor(activity.getResources(), R.color.ntp_bg); |
+ mBackgroundColor = ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS) |
+ ? ApiCompatibilityUtils.getColor(activity.getResources(), R.color.ntp_with_cards_bg) |
+ : ApiCompatibilityUtils.getColor(activity.getResources(), R.color.ntp_bg); |
mThemeColor = ApiCompatibilityUtils.getColor( |
activity.getResources(), R.color.default_primary_color); |
TemplateUrlService.getInstance().addObserver(this); |
@@ -657,13 +660,8 @@ public class NewTabPage |
} |
private void updateSearchProviderHasLogo() { |
- if (ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS)) { |
- mSearchProviderHasLogo = false; |
- if (mNewTabPageView != null) mNewTabPageView.setSearchProviderHasLogo(false); |
- } else { |
- mSearchProviderHasLogo = !mOptOutPromoShown |
- && TemplateUrlService.getInstance().isDefaultSearchEngineGoogle(); |
- } |
+ mSearchProviderHasLogo = !mOptOutPromoShown |
+ && TemplateUrlService.getInstance().isDefaultSearchEngineGoogle(); |
} |
private void onSearchEngineUpdated() { |