Index: chrome/browser/android/banners/app_banner_manager.cc |
diff --git a/chrome/browser/android/banners/app_banner_manager.cc b/chrome/browser/android/banners/app_banner_manager.cc |
index b3f1f565a84e9d924593074472abcee91177f957..35e0b253d27f5d65a72a5317baa2db548a011f53 100644 |
--- a/chrome/browser/android/banners/app_banner_manager.cc |
+++ b/chrome/browser/android/banners/app_banner_manager.cc |
@@ -7,7 +7,7 @@ |
#include "base/android/jni_android.h" |
#include "base/android/jni_string.h" |
#include "base/bind.h" |
-#include "base/command_line.h" |
+#include "base/metrics/field_trial.h" |
#include "base/metrics/histogram.h" |
#include "chrome/browser/android/banners/app_banner_infobar_delegate.h" |
#include "chrome/browser/android/manifest_icon_selector.h" |
@@ -19,7 +19,6 @@ |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/chrome_constants.h" |
-#include "chrome/common/chrome_switches.h" |
#include "chrome/common/render_messages.h" |
#include "content/public/browser/android/content_view_core.h" |
#include "content/public/browser/browser_context.h" |
@@ -355,8 +354,9 @@ jlong Init(JNIEnv* env, jobject obj, jint icon_size) { |
} |
jboolean IsEnabled(JNIEnv* env, jclass clazz) { |
- return base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableAppInstallAlerts); |
+ const std::string group_name = |
+ base::FieldTrialList::FindFullName("AppBanners"); |
+ return group_name == "Enabled"; |
} |
void SetTimeDeltaForTesting(JNIEnv* env, jclass clazz, jint days) { |