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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.java

Issue 1997473004: Snippets are enabled when search suggestions are enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.java
index f96353689ffaa020b85d4b34f16f96b8d4ead669..d2e7269d753f3c8cae73935028a1e57223109d2e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.java
@@ -9,13 +9,13 @@
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeFeatureList;
+import org.chromium.chrome.browser.ntp.snippets.SnippetsConfig;
/**
* Utility class for figuring out which colors to use for the NTP. This class is needed while we
* transition the NTP to the new material design spec.
*/
-public class NtpColorUtils {
-
+public final class NtpColorUtils {
private NtpColorUtils() {}
public static int getBackgroundColorResource(Resources res, boolean isIncognito) {
@@ -34,8 +34,8 @@ public static int getToolbarBackgroundColorResource(Resources res) {
: ApiCompatibilityUtils.getColor(res, R.color.ntp_bg);
}
- private static boolean shouldUseMaterialColors() {
- return ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS)
+ public static boolean shouldUseMaterialColors() {
+ return SnippetsConfig.isEnabled()
|| ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_MATERIAL_DESIGN);
}
}

Powered by Google App Engine
This is Rietveld 408576698