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

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

Issue 1870703002: Connect the "other forms of browsing history" frontend on Android to backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-dialog-rebased
Patch Set: Addressed comments. Created 4 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 381b475c7c400a90417dee405a9d81ab8f441937..25953f931889d2c80aead61edeec3b117f2d01d1 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
@@ -72,6 +72,33 @@ public final class PrefServiceBridge {
}
}
+ /**
+ * Interface for a class that is listening to clear browser data events.
+ */
+ public interface OnClearBrowsingDataListener {
+ public abstract void onBrowsingDataCleared();
+ }
+
+ /**
+ * Interface to a class that receives callbacks instructing it to inform the user about other
+ * forms of browsing history.
+ */
+ public interface OtherFormsOfBrowsingHistoryListener {
+ /**
+ * Called by the web history service when it discovers that other forms of browsing history
+ * exist.
+ */
+ @CalledByNative("OtherFormsOfBrowsingHistoryListener")
+ public abstract void enableDialogAboutOtherFormsOfBrowsingHistory();
+
+ /**
+ * Called by the web history service when the conditions for showing the dialog about
+ * other forms of browsing history are met.
+ */
+ @CalledByNative("OtherFormsOfBrowsingHistoryListener")
+ public abstract void showNoticeAboutOtherFormsOfBrowsingHistory();
+ }
+
@CalledByNative
private static AboutVersionStrings createAboutVersionStrings(String applicationVersion,
String osVersion) {
@@ -653,13 +680,6 @@ public final class PrefServiceBridge {
}
/**
- * Interface for a class that is listening to clear browser data events.
- */
- public interface OnClearBrowsingDataListener {
- public abstract void onBrowsingDataCleared();
- }
-
- /**
* Checks the state of deletion preference for a certain browsing data type.
* @param dataType The requested browsing data type (from the shared enum
* {@link org.chromium.chrome.browser.BrowsingDataType}).
@@ -730,6 +750,16 @@ public final class PrefServiceBridge {
}
}
+ /**
+ * Requests that the web history service finds out if we should inform the user about the
+ * existence of other forms of browsing history. The response will be asynchronous, through
+ * {@link OtherFormsOfBrowsingHistoryListener}.
+ */
+ public void requestInfoAboutOtherFormsOfBrowsingHistory(
+ OtherFormsOfBrowsingHistoryListener listener) {
+ nativeRequestInfoAboutOtherFormsOfBrowsingHistory(listener);
+ }
+
public void setAllowCookiesEnabled(boolean allow) {
nativeSetAllowCookiesEnabled(allow);
}
@@ -1021,6 +1051,8 @@ public final class PrefServiceBridge {
private native int nativeGetBrowsingDataDeletionTimePeriod();
private native void nativeSetBrowsingDataDeletionTimePeriod(int timePeriod);
private native void nativeClearBrowsingData(int[] dataTypes, int timePeriod);
+ private native void nativeRequestInfoAboutOtherFormsOfBrowsingHistory(
+ OtherFormsOfBrowsingHistoryListener listener);
private native boolean nativeCanDeleteBrowsingHistory();
private native void nativeSetAllowCookiesEnabled(boolean allow);
private native void nativeSetBackgroundSyncEnabled(boolean allow);

Powered by Google App Engine
This is Rietveld 408576698