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(); |
} |