Commit 9bea4830 authored by Daniel Park's avatar Daniel Park Committed by Commit Bot

[Chrome Home Survey] Fixes survey qualification check order

Moves command like check to the top

Bug: 780324
Change-Id: Ia3cfa831d4c642d5cb22e28701ec6fb9ca1f05b9
Reviewed-on: https://chromium-review.googlesource.com/748206Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Daniel Park <danielpark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513220}
parent e151baf1
......@@ -32,12 +32,13 @@ import org.chromium.content_public.browser.WebContentsObserver;
* Class that controls if and when to show surveys related to the Chrome Home experiment.
*/
public class ChromeHomeSurveyController {
static final String SURVEY_INFO_BAR_DISPLAYED = "chrome_home_survey_info_bar_displayed";
static final long ONE_WEEK_IN_MILLIS = 604800000L;
public static final String SURVEY_INFO_BAR_DISPLAYED = "chrome_home_survey_info_bar_displayed";
public static final String PARAM_NAME = "survey_override_site_id";
private static final String PARAM_NAME = "survey_override_site_id";
private static final String TRIAL_NAME = "ChromeHome";
static final long ONE_WEEK_IN_MILLIS = 604800000L;
private TabModelSelector mTabModelSelector;
private ChromeHomeSurveyController() {
......@@ -80,10 +81,10 @@ public class ChromeHomeSurveyController {
}
private boolean doesUserQualifyForSurvey() {
if (!isUMAEnabled()) return false;
if (CommandLine.getInstance().hasSwitch(ChromeSwitches.CHROME_HOME_FORCE_ENABLE_SURVEY)) {
return true;
}
if (!isUMAEnabled()) return false;
if (AccessibilityUtil.isAccessibilityEnabled()) return false;
if (hasInfoBarBeenDisplayed()) return false;
if (!FeatureUtilities.isChromeHomeEnabled()) return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment