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

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

Issue 1048803003: Revert of New UMA settings fragment for Chrome on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 9 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 b1de7cb65eb81fa897ff923c52a12900cbe30b68..97345a1729147bb1cf2c0f7812bd4673f5bf241c 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
@@ -12,7 +12,6 @@ import android.util.Log;
import org.chromium.base.CalledByNative;
import org.chromium.base.ThreadUtils;
-import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.ContentSetting;
import org.chromium.chrome.browser.preferences.website.JavaScriptExceptionInfo;
import org.chromium.chrome.browser.preferences.website.PopupExceptionInfo;
@@ -26,7 +25,8 @@ import java.util.List;
* preferences should be grouped with their relevant functionality but this is a grab-bag for other
* preferences.
*/
-public class PrefServiceBridge {
+public final class PrefServiceBridge {
+
// Does not need sync with native; used for the popup settings check
public static final String EXCEPTION_SETTING_ALLOW = "allow";
public static final String EXCEPTION_SETTING_BLOCK = "block";
@@ -104,15 +104,7 @@ public class PrefServiceBridge {
}
private PrefServiceBridge() {
- this(true);
- }
-
- /**
- * Constructor used for mock PrefServiceBridge without accessing TemplateUrlService.
- */
- @VisibleForTesting
- protected PrefServiceBridge(boolean loadTemplateUrlService) {
- if (loadTemplateUrlService) TemplateUrlService.getInstance().load();
+ TemplateUrlService.getInstance().load();
}
private static PrefServiceBridge sInstance;
@@ -127,23 +119,6 @@ public class PrefServiceBridge {
}
/**
- * @return The singleton preferences object without initiating it even if it is null.
- */
- @VisibleForTesting
- public static PrefServiceBridge getInstanceForTesting() {
- return sInstance;
- }
-
- /**
- * Sets the PrefServiceBridge instance with the passed instance. Used in
- * testing to reset the instance to its previous value.
- */
- @VisibleForTesting
- public static void setInstanceForTesting(PrefServiceBridge instance) {
- sInstance = instance;
- }
-
- /**
* @return Whether the preferences have been initialized.
*/
public static boolean isInitialized() {
@@ -828,30 +803,6 @@ public class PrefServiceBridge {
return nativeGetSupervisedUserSecondCustodianProfileImageURL();
}
- /**
- * @return whether Metrics reporting is enabled.
- */
- @VisibleForTesting
- public boolean isMetricsReportingEnabled() {
- return nativeGetMetricsReportingEnabled();
- }
-
- /**
- * Sets whether the metrics reporting should be enabled.
- */
- @VisibleForTesting
- public void setMetricsReportingEnabled(boolean enabled) {
- nativeSetMetricsReportingEnabled(enabled);
- }
-
- /**
- * @return whether the metrics reporting preference has been set by user.
- */
- @VisibleForTesting
- public boolean hasSetMetricsReporting() {
- return nativeHasSetMetricsReporting();
- }
-
private native boolean nativeGetAcceptCookiesEnabled();
private native boolean nativeGetAcceptCookiesManaged();
private native boolean nativeGetBlockThirdPartyCookiesEnabled();
@@ -939,7 +890,4 @@ public 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