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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java

Issue 2275513003: Move usage and crash reporting to opt-out by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 4 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/firstrun/FirstRunFlowSequencer.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
index 4a165ca4ee91209b193f8a09dd12a3b4c9db5b7a..d61592c867f6c8f36f472f360923ad283adcd555 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
@@ -37,13 +37,6 @@ public abstract class FirstRunFlowSequencer {
private final Bundle mLaunchProperties;
/**
- * Determines if the metrics reporting checkbox is initially checked when shown to the user. If
- * reporting is opt-in, then it won't be checked.
- */
- @VisibleForTesting
- protected boolean mIsMetricsReportingOptIn;
-
- /**
* Callback that is called once the flow is determined.
* If the properties is null, the First Run experience needs to finish and
* restart the original intent if necessary.
@@ -51,11 +44,9 @@ public abstract class FirstRunFlowSequencer {
*/
public abstract void onFlowIsKnown(Bundle freProperties);
- public FirstRunFlowSequencer(
- Activity activity, Bundle launcherProvidedProperties, boolean isMetricsReportingOptIn) {
+ public FirstRunFlowSequencer(Activity activity, Bundle launcherProvidedProperties) {
mActivity = activity;
mLaunchProperties = launcherProvidedProperties;
- mIsMetricsReportingOptIn = isMetricsReportingOptIn;
}
/**
@@ -124,8 +115,9 @@ public abstract class FirstRunFlowSequencer {
}
@VisibleForTesting
- protected void enableCrashUpload() {
- PrivacyPreferencesManager.getInstance().initCrashUploadPreference(true);
+ protected void setDefaultMetricsAndCrashReporting() {
+ PrivacyPreferencesManager.getInstance().initCrashUploadPreference(
+ FirstRunActivity.DEFAULT_METRICS_AND_CRASH_REPORTING);
}
@VisibleForTesting
@@ -157,12 +149,10 @@ public abstract class FirstRunFlowSequencer {
boolean showWelcomePage = !forceEduSignIn;
freProperties.putBoolean(FirstRunActivity.SHOW_WELCOME_PAGE, showWelcomePage);
- // Enable reporting by default on non-Stable releases.
- // The user can turn it off on the Welcome page.
+ // Initialize usage and crash reporting according to the default value.
+ // The user can explicitly enable or disable the reporting on the Welcome page.
// This is controlled by the administrator via a policy on EDU devices.
- if (!mIsMetricsReportingOptIn) {
- enableCrashUpload();
- }
+ setDefaultMetricsAndCrashReporting();
// We show the sign-in page if sync is allowed, and not signed in, and this is not an EDU
// device, and

Powered by Google App Engine
This is Rietveld 408576698