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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java

Issue 1058433007: New UMA settings fragment using Android prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove pref init Created 5 years, 8 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/preferences/PrefServiceBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
index d336d844287be3e034ac059142069e5c25009808..80b57974104b94adf4e75520c5867c2faeed0038 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
@@ -863,6 +863,28 @@ public final class PrefServiceBridge {
int contentSettingsType, List<ContentSettingException> list);
public native void nativeSetContentSettingForPattern(
int contentSettingType, String pattern, int setting);
+
+ /**
+ * @return whether Metrics reporting is enabled.
+ */
+ public boolean isMetricsReportingEnabled() {
+ return nativeGetMetricsReportingEnabled();
+ }
+
+ /**
+ * Sets whether the metrics reporting should be enabled.
+ */
+ public void setMetricsReportingEnabled(boolean enabled) {
+ nativeSetMetricsReportingEnabled(enabled);
+ }
+
+ /**
+ * @return whether the metrics reporting preference has been set by user.
+ */
+ public boolean hasSetMetricsReporting() {
+ return nativeHasSetMetricsReporting();
+ }
+
private native boolean nativeGetAcceptCookiesEnabled();
private native boolean nativeGetAcceptCookiesManaged();
private native boolean nativeGetBlockThirdPartyCookiesEnabled();
@@ -945,4 +967,7 @@ public final class PrefServiceBridge {
private native String nativeGetSupervisedUserSecondCustodianName();
private native String nativeGetSupervisedUserSecondCustodianEmail();
private native String nativeGetSupervisedUserSecondCustodianProfileImageURL();
+ private native boolean nativeGetMetricsReportingEnabled();
+ private native void nativeSetMetricsReportingEnabled(boolean enabled);
+ private native boolean nativeHasSetMetricsReporting();
}

Powered by Google App Engine
This is Rietveld 408576698