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

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

Issue 1663983003: Add a time period dropdown to the CBD dialog on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.preferences; 5 package org.chromium.chrome.browser.preferences;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.SharedPreferences; 8 import android.content.SharedPreferences;
9 import android.preference.PreferenceManager; 9 import android.preference.PreferenceManager;
10 import android.util.Log; 10 import android.util.Log;
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 * Sets the state of deletion preference for a certain browsing data type. 652 * Sets the state of deletion preference for a certain browsing data type.
653 * @param dataType The requested browsing data type (from the shared enum 653 * @param dataType The requested browsing data type (from the shared enum
654 * {@link org.chromium.chrome.browser.BrowsingDataType}). 654 * {@link org.chromium.chrome.browser.BrowsingDataType}).
655 * @param value The state to be set. 655 * @param value The state to be set.
656 */ 656 */
657 public void setBrowsingDataDeletionPreference(int dataType, boolean value) { 657 public void setBrowsingDataDeletionPreference(int dataType, boolean value) {
658 nativeSetBrowsingDataDeletionPreference(dataType, value); 658 nativeSetBrowsingDataDeletionPreference(dataType, value);
659 } 659 }
660 660
661 /** 661 /**
662 * Gets the time period for which browsing data will be deleted.
663 * @return The currently selected browsing data deletion time period (from t he shared enum
664 * {@link org.chromium.chrome.browser.TimePeriod}).
665 */
666 public int getBrowsingDataDeletionTimePeriod() {
667 return nativeGetBrowsingDataDeletionTimePeriod();
668 }
669
670 /**
671 * Sets the time period for which browsing data will be deleted.
672 * @param timePeriod The selected browsing data deletion time period (from t he shared enum
673 * {@link org.chromium.chrome.browser.TimePeriod}).
674 */
675 public void setBrowsingDataDeletionTimePeriod(int timePeriod) {
676 nativeSetBrowsingDataDeletionTimePeriod(timePeriod);
677 }
678
679 /**
662 * Clear the specified types of browsing data asynchronously. 680 * Clear the specified types of browsing data asynchronously.
663 * |listener| is an object to be notified when clearing completes. 681 * |listener| is an object to be notified when clearing completes.
664 * It can be null, but many operations (e.g. navigation) are 682 * It can be null, but many operations (e.g. navigation) are
665 * ill-advised while browsing data is being cleared. 683 * ill-advised while browsing data is being cleared.
666 * @param listener A listener to call back when the clearing is finished. 684 * @param listener A listener to call back when the clearing is finished.
667 * @param dataTypes An array of browsing data types to delete, represented a s values from 685 * @param dataTypes An array of browsing data types to delete, represented a s values from
668 * the shared enum {@link org.chromium.chrome.browser.BrowsingDataType} . 686 * the shared enum {@link org.chromium.chrome.browser.BrowsingDataType} .
669 */ 687 */
670 public void clearBrowsingData(OnClearBrowsingDataListener listener, int[] da taTypes) { 688 public void clearBrowsingData(OnClearBrowsingDataListener listener, int[] da taTypes) {
671 assert mClearBrowsingDataListener == null; 689 assert mClearBrowsingDataListener == null;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 private native boolean nativeGetPrintingEnabled(); 1011 private native boolean nativeGetPrintingEnabled();
994 private native boolean nativeGetPrintingManaged(); 1012 private native boolean nativeGetPrintingManaged();
995 private native boolean nativeGetSupervisedUserSafeSitesEnabled(); 1013 private native boolean nativeGetSupervisedUserSafeSitesEnabled();
996 private native void nativeSetTranslateEnabled(boolean enabled); 1014 private native void nativeSetTranslateEnabled(boolean enabled);
997 private native void nativeSetAutoDetectEncodingEnabled(boolean enabled); 1015 private native void nativeSetAutoDetectEncodingEnabled(boolean enabled);
998 private native void nativeResetTranslateDefaults(); 1016 private native void nativeResetTranslateDefaults();
999 private native void nativeMigrateJavascriptPreference(); 1017 private native void nativeMigrateJavascriptPreference();
1000 private native void nativeSetJavaScriptAllowed(String pattern, int setting); 1018 private native void nativeSetJavaScriptAllowed(String pattern, int setting);
1001 private native boolean nativeGetBrowsingDataDeletionPreference(int dataType) ; 1019 private native boolean nativeGetBrowsingDataDeletionPreference(int dataType) ;
1002 private native void nativeSetBrowsingDataDeletionPreference(int dataType, bo olean value); 1020 private native void nativeSetBrowsingDataDeletionPreference(int dataType, bo olean value);
1021 private native int nativeGetBrowsingDataDeletionTimePeriod();
1022 private native void nativeSetBrowsingDataDeletionTimePeriod(int timePeriod);
1003 private native void nativeClearBrowsingData(int[] dataTypes); 1023 private native void nativeClearBrowsingData(int[] dataTypes);
1004 private native boolean nativeCanDeleteBrowsingHistory(); 1024 private native boolean nativeCanDeleteBrowsingHistory();
1005 private native void nativeSetAllowCookiesEnabled(boolean allow); 1025 private native void nativeSetAllowCookiesEnabled(boolean allow);
1006 private native void nativeSetBlockThirdPartyCookiesEnabled(boolean enabled); 1026 private native void nativeSetBlockThirdPartyCookiesEnabled(boolean enabled);
1007 private native void nativeSetDoNotTrackEnabled(boolean enabled); 1027 private native void nativeSetDoNotTrackEnabled(boolean enabled);
1008 private native void nativeSetFullscreenAllowed(boolean allowed); 1028 private native void nativeSetFullscreenAllowed(boolean allowed);
1009 private native void nativeSetRememberPasswordsEnabled(boolean allow); 1029 private native void nativeSetRememberPasswordsEnabled(boolean allow);
1010 private native void nativeSetPasswordManagerAutoSigninEnabled(boolean enable d); 1030 private native void nativeSetPasswordManagerAutoSigninEnabled(boolean enable d);
1011 private native void nativeSetProtectedMediaIdentifierEnabled(boolean enabled ); 1031 private native void nativeSetProtectedMediaIdentifierEnabled(boolean enabled );
1012 private native boolean nativeGetAllowLocationEnabled(); 1032 private native boolean nativeGetAllowLocationEnabled();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 private native String nativeGetSupervisedUserSecondCustodianName(); 1068 private native String nativeGetSupervisedUserSecondCustodianName();
1049 private native String nativeGetSupervisedUserSecondCustodianEmail(); 1069 private native String nativeGetSupervisedUserSecondCustodianEmail();
1050 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( ); 1070 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( );
1051 private native boolean nativeGetMetricsReportingEnabled(); 1071 private native boolean nativeGetMetricsReportingEnabled();
1052 private native void nativeSetMetricsReportingEnabled(boolean enabled); 1072 private native void nativeSetMetricsReportingEnabled(boolean enabled);
1053 private native boolean nativeHasSetMetricsReporting(); 1073 private native boolean nativeHasSetMetricsReporting();
1054 private native void nativeSetClickedUpdateMenuItem(boolean clicked); 1074 private native void nativeSetClickedUpdateMenuItem(boolean clicked);
1055 private native boolean nativeGetClickedUpdateMenuItem(); 1075 private native boolean nativeGetClickedUpdateMenuItem();
1056 private native void nativeSetSupervisedUserId(String supervisedUserId); 1076 private native void nativeSetSupervisedUserId(String supervisedUserId);
1057 } 1077 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698