org.chromium.chrome.browser.preferences.ManagedPreferenceDelegate Java Examples
The following examples show how to use
org.chromium.chrome.browser.preferences.ManagedPreferenceDelegate.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PrivacyPreferences.java From AndroidChromium with Apache License 2.0 | 6 votes |
private ManagedPreferenceDelegate createManagedPreferenceDelegate() { return new ManagedPreferenceDelegate() { @Override public boolean isPreferenceControlledByPolicy(Preference preference) { String key = preference.getKey(); PrefServiceBridge prefs = PrefServiceBridge.getInstance(); if (PREF_NAVIGATION_ERROR.equals(key)) { return prefs.isResolveNavigationErrorManaged(); } if (PREF_SEARCH_SUGGESTIONS.equals(key)) { return prefs.isSearchSuggestManaged(); } if (PREF_SAFE_BROWSING_EXTENDED_REPORTING.equals(key) || PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) { return prefs.isSafeBrowsingExtendedReportingManaged(); } if (PREF_SAFE_BROWSING.equals(key)) { return prefs.isSafeBrowsingManaged(); } if (PREF_NETWORK_PREDICTIONS.equals(key)) { return prefs.isNetworkPredictionManaged(); } return false; } }; }
Example #2
Source File: PrivacyPreferences.java From 365browser with Apache License 2.0 | 6 votes |
private ManagedPreferenceDelegate createManagedPreferenceDelegate() { return new ManagedPreferenceDelegate() { @Override public boolean isPreferenceControlledByPolicy(Preference preference) { String key = preference.getKey(); PrefServiceBridge prefs = PrefServiceBridge.getInstance(); if (PREF_NAVIGATION_ERROR.equals(key)) { return prefs.isResolveNavigationErrorManaged(); } if (PREF_SEARCH_SUGGESTIONS.equals(key)) { return prefs.isSearchSuggestManaged(); } if (PREF_SAFE_BROWSING_EXTENDED_REPORTING.equals(key) || PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) { return prefs.isSafeBrowsingExtendedReportingManaged(); } if (PREF_SAFE_BROWSING.equals(key)) { return prefs.isSafeBrowsingManaged(); } if (PREF_NETWORK_PREDICTIONS.equals(key)) { return prefs.isNetworkPredictionManaged(); } return false; } }; }
Example #3
Source File: SingleCategoryPreferences.java From delion with Apache License 2.0 | 5 votes |
private void updateThirdPartyCookiesCheckBox() { ChromeBaseCheckBoxPreference thirdPartyCookiesPref = (ChromeBaseCheckBoxPreference) getPreferenceScreen().findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY); thirdPartyCookiesPref.setEnabled(PrefServiceBridge.getInstance().isAcceptCookiesEnabled()); thirdPartyCookiesPref.setManagedPreferenceDelegate(new ManagedPreferenceDelegate() { @Override public boolean isPreferenceControlledByPolicy(Preference preference) { return PrefServiceBridge.getInstance().isBlockThirdPartyCookiesManaged(); } }); }
Example #4
Source File: PrivacyPreferences.java From delion with Apache License 2.0 | 5 votes |
private ManagedPreferenceDelegate createManagedPreferenceDelegate() { return new ManagedPreferenceDelegate() { @Override public boolean isPreferenceControlledByPolicy(Preference preference) { String key = preference.getKey(); PrefServiceBridge prefs = PrefServiceBridge.getInstance(); if (PREF_NAVIGATION_ERROR.equals(key)) { return prefs.isResolveNavigationErrorManaged(); } if (PREF_SEARCH_SUGGESTIONS.equals(key)) { return prefs.isSearchSuggestManaged(); } if (PREF_SAFE_BROWSING_EXTENDED_REPORTING.equals(key)) { return prefs.isSafeBrowsingExtendedReportingManaged(); } if (PREF_SAFE_BROWSING.equals(key)) { return prefs.isSafeBrowsingManaged(); } if (PREF_NETWORK_PREDICTIONS.equals(key)) { return prefs.isNetworkPredictionManaged(); } if (PREF_CRASH_DUMP_UPLOAD.equals(key) || PREF_CRASH_DUMP_UPLOAD_NO_CELLULAR.equals(key)) { return prefs.isCrashReportManaged(); } return false; } }; }
Example #5
Source File: SingleCategoryPreferences.java From AndroidChromium with Apache License 2.0 | 5 votes |
private void updateThirdPartyCookiesCheckBox() { ChromeBaseCheckBoxPreference thirdPartyCookiesPref = (ChromeBaseCheckBoxPreference) getPreferenceScreen().findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY); thirdPartyCookiesPref.setEnabled(PrefServiceBridge.getInstance().isAcceptCookiesEnabled()); thirdPartyCookiesPref.setManagedPreferenceDelegate(new ManagedPreferenceDelegate() { @Override public boolean isPreferenceControlledByPolicy(Preference preference) { return PrefServiceBridge.getInstance().isBlockThirdPartyCookiesManaged(); } }); }
Example #6
Source File: SingleCategoryPreferences.java From 365browser with Apache License 2.0 | 5 votes |
private void updateThirdPartyCookiesCheckBox() { ChromeBaseCheckBoxPreference thirdPartyCookiesPref = (ChromeBaseCheckBoxPreference) getPreferenceScreen().findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY); thirdPartyCookiesPref.setChecked( !PrefServiceBridge.getInstance().isBlockThirdPartyCookiesEnabled()); thirdPartyCookiesPref.setEnabled(PrefServiceBridge.getInstance().isAcceptCookiesEnabled()); thirdPartyCookiesPref.setManagedPreferenceDelegate(new ManagedPreferenceDelegate() { @Override public boolean isPreferenceControlledByPolicy(Preference preference) { return PrefServiceBridge.getInstance().isBlockThirdPartyCookiesManaged(); } }); }