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

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: Reorganized some code 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 fbd92abb32b1a3811357284e709cdabd77cd288a..6aa7b5d52e465f01f0eb97708839c85e14661f5d 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
@@ -7,27 +7,23 @@ package org.chromium.chrome.browser.physicalweb;
import android.content.Context;
import android.os.AsyncTask;
-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;
/**
* This class provides the basic interface to the Physical Web feature.
*/
public class PhysicalWeb {
+ private static final String FEATURE_NAME = "PhysicalWeb";
+
/**
* Evaluate whether the environment is one in which the Physical Web should
* be enabled.
* @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);
}
/**

Powered by Google App Engine
This is Rietveld 408576698