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

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

Issue 1530123002: Prepare ClearBrowsingDataDialogFragment for browsing data counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@utils
Patch Set: Added *Bridge class, shared enum Created 4 years, 11 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 nativeSetResolveNavigationErrorEnabled(enabled); 624 nativeSetResolveNavigationErrorEnabled(enabled);
625 } 625 }
626 626
627 /** 627 /**
628 * Interface for a class that is listening to clear browser data events. 628 * Interface for a class that is listening to clear browser data events.
629 */ 629 */
630 public interface OnClearBrowsingDataListener { 630 public interface OnClearBrowsingDataListener {
631 public abstract void onBrowsingDataCleared(); 631 public abstract void onBrowsingDataCleared();
632 } 632 }
633 633
634 public boolean getBrowsingDataDeletionPreference(int dataType) {
newt (away) 2016/01/12 18:55:26 public methods need javadoc.
msramek 2016/01/13 15:27:53 Done. (Hmm, there is a presubmit warning for class
newt (away) 2016/01/13 20:01:49 We haven't enabled the presubmit warning for metho
635 return nativeGetBrowsingDataDeletionPreference(dataType);
636 }
637
638 public void setBrowsingDataDeletionPreference(int dataType, boolean value) {
newt (away) 2016/01/12 18:55:26 javadoc
msramek 2016/01/13 15:27:53 Done.
639 nativeSetBrowsingDataDeletionPreference(dataType, value);
640 }
641
634 /** 642 /**
635 * Clear the specified types of browsing data asynchronously. 643 * Clear the specified types of browsing data asynchronously.
newt (away) 2016/01/12 18:55:26 Explain what the valid values for dataTypes are
msramek 2016/01/13 15:27:53 Done.
636 * |listener| is an object to be notified when clearing completes. 644 * |listener| is an object to be notified when clearing completes.
637 * It can be null, but many operations (e.g. navigation) are 645 * It can be null, but many operations (e.g. navigation) are
638 * ill-advised while browsing data is being cleared. 646 * ill-advised while browsing data is being cleared.
639 */ 647 */
640 public void clearBrowsingData(OnClearBrowsingDataListener listener, 648 public void clearBrowsingData(OnClearBrowsingDataListener listener, int[] da taTypes) {
641 boolean history, boolean cache, boolean cookiesAndSiteData,
642 boolean passwords, boolean formData) {
643 assert mClearBrowsingDataListener == null; 649 assert mClearBrowsingDataListener == null;
644 mClearBrowsingDataListener = listener; 650 mClearBrowsingDataListener = listener;
645 nativeClearBrowsingData(history, cache, cookiesAndSiteData, passwords, f ormData); 651 nativeClearBrowsingData(dataTypes);
646 } 652 }
647 653
648 /* 654 /*
649 * Whether browser history can be deleted by the user. 655 * Whether browser history can be deleted by the user.
650 */ 656 */
651 public boolean canDeleteBrowsingHistory() { 657 public boolean canDeleteBrowsingHistory() {
652 return nativeCanDeleteBrowsingHistory(); 658 return nativeCanDeleteBrowsingHistory();
653 } 659 }
654 660
655 @CalledByNative 661 @CalledByNative
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 private native boolean nativeGetIncognitoModeEnabled(); 969 private native boolean nativeGetIncognitoModeEnabled();
964 private native boolean nativeGetIncognitoModeManaged(); 970 private native boolean nativeGetIncognitoModeManaged();
965 private native boolean nativeGetPrintingEnabled(); 971 private native boolean nativeGetPrintingEnabled();
966 private native boolean nativeGetPrintingManaged(); 972 private native boolean nativeGetPrintingManaged();
967 private native boolean nativeGetSupervisedUserSafeSitesEnabled(); 973 private native boolean nativeGetSupervisedUserSafeSitesEnabled();
968 private native void nativeSetTranslateEnabled(boolean enabled); 974 private native void nativeSetTranslateEnabled(boolean enabled);
969 private native void nativeSetAutoDetectEncodingEnabled(boolean enabled); 975 private native void nativeSetAutoDetectEncodingEnabled(boolean enabled);
970 private native void nativeResetTranslateDefaults(); 976 private native void nativeResetTranslateDefaults();
971 private native void nativeMigrateJavascriptPreference(); 977 private native void nativeMigrateJavascriptPreference();
972 private native void nativeSetJavaScriptAllowed(String pattern, int setting); 978 private native void nativeSetJavaScriptAllowed(String pattern, int setting);
973 private native void nativeClearBrowsingData(boolean history, boolean cache, 979 private native boolean nativeGetBrowsingDataDeletionPreference(int dataType) ;
974 boolean cookiesAndSiteData, boolean passwords, boolean formData); 980 private native void nativeSetBrowsingDataDeletionPreference(int dataType, bo olean value);
981 private native void nativeClearBrowsingData(int[] dataTypes);
975 private native boolean nativeCanDeleteBrowsingHistory(); 982 private native boolean nativeCanDeleteBrowsingHistory();
976 private native void nativeSetAllowCookiesEnabled(boolean allow); 983 private native void nativeSetAllowCookiesEnabled(boolean allow);
977 private native void nativeSetBlockThirdPartyCookiesEnabled(boolean enabled); 984 private native void nativeSetBlockThirdPartyCookiesEnabled(boolean enabled);
978 private native void nativeSetDoNotTrackEnabled(boolean enabled); 985 private native void nativeSetDoNotTrackEnabled(boolean enabled);
979 private native void nativeSetFullscreenAllowed(boolean allowed); 986 private native void nativeSetFullscreenAllowed(boolean allowed);
980 private native void nativeSetRememberPasswordsEnabled(boolean allow); 987 private native void nativeSetRememberPasswordsEnabled(boolean allow);
981 private native void nativeSetPasswordManagerAutoSigninEnabled(boolean enable d); 988 private native void nativeSetPasswordManagerAutoSigninEnabled(boolean enable d);
982 private native void nativeSetProtectedMediaIdentifierEnabled(boolean enabled ); 989 private native void nativeSetProtectedMediaIdentifierEnabled(boolean enabled );
983 private native boolean nativeGetAllowLocationEnabled(); 990 private native boolean nativeGetAllowLocationEnabled();
984 private native boolean nativeGetPushNotificationsEnabled(); 991 private native boolean nativeGetPushNotificationsEnabled();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 private native String nativeGetSupervisedUserSecondCustodianName(); 1025 private native String nativeGetSupervisedUserSecondCustodianName();
1019 private native String nativeGetSupervisedUserSecondCustodianEmail(); 1026 private native String nativeGetSupervisedUserSecondCustodianEmail();
1020 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( ); 1027 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( );
1021 private native boolean nativeGetMetricsReportingEnabled(); 1028 private native boolean nativeGetMetricsReportingEnabled();
1022 private native void nativeSetMetricsReportingEnabled(boolean enabled); 1029 private native void nativeSetMetricsReportingEnabled(boolean enabled);
1023 private native boolean nativeHasSetMetricsReporting(); 1030 private native boolean nativeHasSetMetricsReporting();
1024 private native void nativeSetClickedUpdateMenuItem(boolean clicked); 1031 private native void nativeSetClickedUpdateMenuItem(boolean clicked);
1025 private native boolean nativeGetClickedUpdateMenuItem(); 1032 private native boolean nativeGetClickedUpdateMenuItem();
1026 private native void nativeSetSupervisedUserId(String supervisedUserId); 1033 private native void nativeSetSupervisedUserId(String supervisedUserId);
1027 } 1034 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698