| 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 1722110318785d5b1e5f1449c53de6ebeb81ac50..25a5563dfc6727f679dac6e462651335bd8fb1cc 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
|
| @@ -510,7 +510,7 @@ public final class PrefServiceBridge {
|
| }
|
|
|
| /**
|
| - * @param Whether Contextual Search should be enabled.
|
| + * @param enabled Whether Contextual Search should be enabled.
|
| */
|
| public void setContextualSearchState(boolean enabled) {
|
| setContextualSearchPreference(enabled
|
| @@ -532,7 +532,7 @@ public final class PrefServiceBridge {
|
| }
|
|
|
| /**
|
| - * @param Whether Safe Browsing Extended Reporting should be enabled.
|
| + * @param enabled Whether Safe Browsing Extended Reporting should be enabled.
|
| */
|
| public void setSafeBrowsingExtendedReportingEnabled(boolean enabled) {
|
| nativeSetSafeBrowsingExtendedReportingEnabled(enabled);
|
| @@ -553,7 +553,7 @@ public final class PrefServiceBridge {
|
| }
|
|
|
| /**
|
| - * @param Whether Safe Browsing should be enabled.
|
| + * @param enabled Whether Safe Browsing should be enabled.
|
| */
|
| public void setSafeBrowsingEnabled(boolean enabled) {
|
| nativeSetSafeBrowsingEnabled(enabled);
|
| @@ -650,38 +650,47 @@ public final class PrefServiceBridge {
|
| * 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.browsing_data.BrowsingDataType}).
|
| + * @param preferenceType Indicates if this is a checkbox on the default, basic or advanced tab
|
| + * to apply the right preference.
|
| * @return The state of the corresponding deletion preference.
|
| */
|
| - public boolean getBrowsingDataDeletionPreference(int dataType) {
|
| - return nativeGetBrowsingDataDeletionPreference(dataType);
|
| + public boolean getBrowsingDataDeletionPreference(int dataType, int preferenceType) {
|
| + return nativeGetBrowsingDataDeletionPreference(dataType, preferenceType);
|
| }
|
|
|
| /**
|
| * Sets 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.browsing_data.BrowsingDataType}).
|
| + * @param preferenceType Indicates if this is a checkbox on the default, basic or advanced tab
|
| + * to apply the right preference.
|
| * @param value The state to be set.
|
| */
|
| - public void setBrowsingDataDeletionPreference(int dataType, boolean value) {
|
| - nativeSetBrowsingDataDeletionPreference(dataType, value);
|
| + public void setBrowsingDataDeletionPreference(int dataType, int preferenceType, boolean value) {
|
| + nativeSetBrowsingDataDeletionPreference(dataType, preferenceType, value);
|
| }
|
|
|
| /**
|
| * Gets the time period for which browsing data will be deleted.
|
| + * @param preferenceType Indicates if this is a timeperiod on the default, basic or advanced tab
|
| + * to apply the right preference.
|
| * @return The currently selected browsing data deletion time period (from the shared enum
|
| * {@link org.chromium.chrome.browser.browsing_data.TimePeriod}).
|
| */
|
| - public int getBrowsingDataDeletionTimePeriod() {
|
| - return nativeGetBrowsingDataDeletionTimePeriod();
|
| + public int getBrowsingDataDeletionTimePeriod(int preferenceType) {
|
| + return nativeGetBrowsingDataDeletionTimePeriod(preferenceType);
|
| }
|
|
|
| /**
|
| * Sets the time period for which browsing data will be deleted.
|
| + * @param preferenceType Indicates if this is a timeperiod on the default, basic or advanced tab
|
| + * to apply the right preference.
|
| +
|
| * @param timePeriod The selected browsing data deletion time period (from the shared enum
|
| * {@link org.chromium.chrome.browser.browsing_data.TimePeriod}).
|
| */
|
| - public void setBrowsingDataDeletionTimePeriod(int timePeriod) {
|
| - nativeSetBrowsingDataDeletionTimePeriod(timePeriod);
|
| + public void setBrowsingDataDeletionTimePeriod(int preferenceType, int timePeriod) {
|
| + nativeSetBrowsingDataDeletionTimePeriod(preferenceType, timePeriod);
|
| }
|
|
|
| /**
|
| @@ -743,6 +752,14 @@ public final class PrefServiceBridge {
|
| }
|
|
|
| /**
|
| + * Migrate browsing data preferences when new "clear browsing data" dialog
|
| + * with tabs is visited.
|
| + */
|
| + public void migrateBrowsingDataPreferences() {
|
| + nativeMigrateBrowsingDataPreferences();
|
| + }
|
| +
|
| + /**
|
| * @return Whether browser history can be deleted by the user.
|
| */
|
| public boolean canDeleteBrowsingHistory() {
|
| @@ -1099,15 +1116,18 @@ public final class PrefServiceBridge {
|
| private native void nativeSetTranslateEnabled(boolean enabled);
|
| private native void nativeResetTranslateDefaults();
|
| private native void nativeMigrateJavascriptPreference();
|
| - private native boolean nativeGetBrowsingDataDeletionPreference(int dataType);
|
| - private native void nativeSetBrowsingDataDeletionPreference(int dataType, boolean value);
|
| - private native int nativeGetBrowsingDataDeletionTimePeriod();
|
| - private native void nativeSetBrowsingDataDeletionTimePeriod(int timePeriod);
|
| + private native boolean nativeGetBrowsingDataDeletionPreference(
|
| + int dataType, int preferenceType);
|
| + private native void nativeSetBrowsingDataDeletionPreference(
|
| + int dataType, int preferenceType, boolean value);
|
| + private native int nativeGetBrowsingDataDeletionTimePeriod(int preferenceType);
|
| + private native void nativeSetBrowsingDataDeletionTimePeriod(int preferenceType, int timePeriod);
|
| private native void nativeClearBrowsingData(int[] dataTypes, int timePeriod,
|
| String[] blacklistDomains, int[] blacklistedDomainReasons, String[] ignoredDomains,
|
| int[] ignoredDomainReasons);
|
| private native int nativeGetLastClearBrowsingDataTab();
|
| private native void nativeSetLastClearBrowsingDataTab(int lastTab);
|
| + private native void nativeMigrateBrowsingDataPreferences();
|
| private native void nativeRequestInfoAboutOtherFormsOfBrowsingHistory(
|
| OtherFormsOfBrowsingHistoryListener listener);
|
| private native boolean nativeCanDeleteBrowsingHistory();
|
|
|