Commit c10b0007 authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Removed ChromeHomeFeedbackSource

Bug: 814528
Change-Id: I1474a77352fd493eaf7635d0d76955cad9ad4608
Reviewed-on: https://chromium-review.googlesource.com/1045512Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556280}
parent 54ef03d3
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.feedback;
import android.util.Pair;
import org.chromium.base.CollectionUtil;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.util.FeatureUtilities;
import java.util.Map;
/** Grabs feedback about the current opt-in/out state of Chrome Home. */
class ChromeHomeFeedbackSource implements FeedbackSource {
/** A user visible string describing Chrome Home's current enabled state. */
@VisibleForTesting
static final String CHROME_HOME_STATE_KEY = "Chrome Home State";
private static final String CHROME_HOME_ENABLED_VALUE = "Enabled";
private static final String CHROME_HOME_DISABLED_VALUE = "Disabled";
private final boolean mIsOffTheRecord;
ChromeHomeFeedbackSource(Profile profile) {
mIsOffTheRecord = profile.isOffTheRecord();
}
@Override
public Map<String, String> getFeedback() {
if (mIsOffTheRecord) return null;
String value = FeatureUtilities.isChromeHomeEnabled() ? CHROME_HOME_ENABLED_VALUE
: CHROME_HOME_DISABLED_VALUE;
return CollectionUtil.newHashMap(Pair.create(CHROME_HOME_STATE_KEY, value));
}
}
\ No newline at end of file
......@@ -80,7 +80,6 @@ public class FeedbackCollector implements Runnable {
sources.add(new VariationsFeedbackSource(profile));
sources.add(new DataReductionProxyFeedbackSource(profile));
sources.add(new HistogramFeedbackSource(profile));
sources.add(new ChromeHomeFeedbackSource(profile));
sources.add(new LowEndDeviceFeedbackSource());
sources.add(new IMEFeedbackSource());
sources.add(new PermissionFeedbackSource());
......@@ -225,4 +224,4 @@ public class FeedbackCollector implements Runnable {
CollectionUtil.forEach(mSynchronousSources, worker);
CollectionUtil.forEach(mAsynchronousSources, worker);
}
}
\ No newline at end of file
}
......@@ -448,7 +448,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/feature_engagement/ScreenshotMonitorDelegate.java",
"java/src/org/chromium/chrome/browser/feedback/AsyncFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/AsyncFeedbackSourceAdapter.java",
"java/src/org/chromium/chrome/browser/feedback/ChromeHomeFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java",
"java/src/org/chromium/chrome/browser/feedback/ConnectivityFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/ConnectivityTask.java",
......
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