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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java

Issue 1512113002: Read feature param for Physical Web experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years 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/physicalweb/PhysicalWeb.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
index 666672bcad13fbca22539a30f8863ec089ebaf61..6874379b00ef396a497848fdd54f4da2db17ac2d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
@@ -9,10 +9,8 @@ import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.preference.PreferenceManager;
-import org.chromium.base.CommandLine;
import org.chromium.chrome.browser.ChromeApplication;
-import org.chromium.chrome.browser.ChromeSwitches;
-import org.chromium.chrome.browser.ChromeVersionInfo;
+import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferencesManager;
/**
@@ -21,6 +19,7 @@ import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferencesManager
public class PhysicalWeb {
public static final int OPTIN_NOTIFY_MAX_TRIES = 1;
private static final String PREF_PHYSICAL_WEB_NOTIFY_COUNT = "physical_web_notify_count";
+ private static final String FEATURE_NAME = "PhysicalWeb";
/**
* Evaluate whether the environment is one in which the Physical Web should
@@ -28,11 +27,7 @@ public class PhysicalWeb {
* @return true if the PhysicalWeb should be enabled
*/
public static boolean featureIsEnabled() {
- boolean allowedChannel =
- ChromeVersionInfo.isLocalBuild() || ChromeVersionInfo.isDevBuild();
- boolean switchEnabled =
- CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_PHYSICAL_WEB);
- return allowedChannel && switchEnabled;
+ return ChromeFeatureList.isEnabled(FEATURE_NAME);
}
/**
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698