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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java

Issue 1716313002: [Herb] Set up field trial for UI prototypes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: startsWith Created 4 years, 10 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/customtabs/CustomTabIntentDataProvider.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
index 79c6db48d6dc880fa367712c9a8570fdad3123cf..d0ad74c5be4246fe36721975fd71bf1211f840c2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
@@ -26,8 +26,9 @@ import org.chromium.base.Log;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity;
+import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.IntentHandler;
-import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
+import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.chrome.browser.util.IntentUtils;
import org.chromium.chrome.browser.widget.TintedDrawable;
@@ -422,7 +423,11 @@ public class CustomTabIntentDataProvider {
* @param context Context for the package.
*/
private void parseHerbExtras(Intent intent, Context context) {
- if (TextUtils.isEmpty(ChromePreferenceManager.getHerbFlavor())) return;
+ String herbFlavor = FeatureUtilities.getHerbFlavor();
+ if (TextUtils.isEmpty(herbFlavor)
+ || TextUtils.equals(ChromeSwitches.HERB_FLAVOR_DISABLED, herbFlavor)) {
+ return;
+ }
if (!IntentHandler.isIntentChromeOrFirstParty(intent, context)) return;
mFinishAfterOpeningInBrowser = IntentUtils.safeGetBooleanExtra(

Powered by Google App Engine
This is Rietveld 408576698