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

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

Issue 1465363002: [Storage] Android - ManageSpace UI, Important Origins, and CBD Dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/website/SingleCategoryPreferences.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
index 467d523406e670c246419ac141c8f28641b122cc..5845519524c12261261c06f160e85bfb34281c49 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
@@ -4,6 +4,11 @@
package org.chromium.chrome.browser.preferences.website;
+import android.app.ActivityManager;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.res.Resources;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
@@ -13,10 +18,15 @@ import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.SearchView;
+import android.text.format.Formatter;
+import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
+import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
@@ -32,9 +42,11 @@ import org.chromium.chrome.browser.preferences.ManagedPreferenceDelegate;
import org.chromium.chrome.browser.preferences.ManagedPreferencesUtils;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.chrome.browser.preferences.ProtectedContentResetCredentialConfirmDialogFragment;
+import org.chromium.chrome.browser.preferences.website.Website.StoredDataClearedCallback;
import org.chromium.chrome.browser.widget.TintedDrawable;
import org.chromium.ui.widget.Toast;
+import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
@@ -60,6 +72,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
private TextView mEmptyView;
// The view for searching the list of items.
private SearchView mSearchView;
+ // The clear button for the storage view.
+ private Button mClearButton;
// The Site Settings Category we are showing.
private SiteSettingsCategory mCategory;
// If not blank, represents a substring to use to search for site names.
@@ -74,7 +88,9 @@ public class SingleCategoryPreferences extends PreferenceFragment
private boolean mIsInitialRun = true;
// The number of sites that are on the Allowed list.
private int mAllowedSiteCount = 0;
-
+ // Lists of websites populated by the ResultsPopulator. Used to calculate storage size and clear
+ // site data.
+ private List<WebsitePreference> mWebsites = null;
// Keys for individual preferences.
public static final String READ_WRITE_TOGGLE_KEY = "read_write_toggle";
public static final String THIRD_PARTY_COOKIES_TOGGLE_KEY = "third_party_cookies";
@@ -109,6 +125,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
// This method may be called after the activity has been destroyed.
// In that case, bail out.
if (getActivity() == null) return;
+ mWebsites = null;
// First we scan origins to get settings from there.
List<WebsitePreference> websites = new ArrayList<>();
@@ -147,11 +164,9 @@ public class SingleCategoryPreferences extends PreferenceFragment
} else {
// Group sites into Allowed/Blocked lists.
PreferenceGroup allowedGroup =
- (PreferenceGroup) getPreferenceScreen().findPreference(
- ALLOWED_GROUP);
+ (PreferenceGroup) getPreferenceScreen().findPreference(ALLOWED_GROUP);
PreferenceGroup blockedGroup =
- (PreferenceGroup) getPreferenceScreen().findPreference(
- BLOCKED_GROUP);
+ (PreferenceGroup) getPreferenceScreen().findPreference(BLOCKED_GROUP);
for (WebsitePreference website : websites) {
if (isOnBlockList(website)) {
@@ -187,10 +202,12 @@ public class SingleCategoryPreferences extends PreferenceFragment
}
updateBlockedHeader(blocked);
- ChromeSwitchPreference globalToggle = (ChromeSwitchPreference)
- getPreferenceScreen().findPreference(READ_WRITE_TOGGLE_KEY);
+ ChromeSwitchPreference globalToggle =
+ (ChromeSwitchPreference) getPreferenceScreen().findPreference(
+ READ_WRITE_TOGGLE_KEY);
updateAllowedHeader(mAllowedSiteCount,
- (globalToggle != null ? globalToggle.isChecked() : true));
+ (globalToggle != null ? globalToggle.isChecked() : true));
+ mWebsites = websites;
} else {
displayEmptyScreenMessage();
updateBlockedHeader(0);
@@ -243,9 +260,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
// When the toggle is set to Blocked, the Allowed list header should read 'Exceptions', not
// 'Allowed' (because it shows exceptions from the rule).
- int resourceId = toggleValue
- ? R.string.website_settings_allowed_group_heading
- : R.string.website_settings_exceptions_group_heading;
+ int resourceId = toggleValue ? R.string.website_settings_allowed_group_heading
+ : R.string.website_settings_exceptions_group_heading;
// Set the title and arrow icons for the header.
allowedGroup.setGroupTitle(resourceId, numAllowed);
@@ -273,13 +289,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
}
@Override
- public void onActivityCreated(Bundle savedInstanceState) {
- addPreferencesFromResource(R.xml.website_preferences);
- ListView listView = (ListView) getView().findViewById(android.R.id.list);
- mEmptyView = (TextView) getView().findViewById(android.R.id.empty);
- listView.setEmptyView(mEmptyView);
- listView.setDivider(null);
-
+ public View onCreateView(
+ LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Read which category we should be showing.
String category = "";
if (getArguments() != null) {
@@ -289,6 +300,127 @@ public class SingleCategoryPreferences extends PreferenceFragment
if (mCategory == null) {
mCategory = SiteSettingsCategory.fromString(SiteSettingsCategory.CATEGORY_ALL_SITES);
}
+ if (!mCategory.showStorageSites()) {
+ return super.onCreateView(inflater, container, savedInstanceState);
+ } else {
+ return inflater.inflate(R.layout.storage_preference_fragment, container, false);
+ }
+ }
+
+ public static boolean deleteDir(File dir) {
+ if (dir != null && dir.isDirectory()) {
+ String[] children = dir.list();
+ for (int i = 0; i < children.length; i++) {
+ boolean success = deleteDir(new File(dir, children[i]));
+ if (!success) {
+ return false;
+ }
+ }
+ }
+
+ return dir.delete();
+ }
+
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
newt (away) 2015/11/25 15:56:25 Too much nesting. Please split this out into a sep
dmurph 2015/11/25 23:47:46 Definitely. I mentioned this a couple times. I'll
+ addPreferencesFromResource(R.xml.website_preferences);
+ ListView listView = (ListView) getView().findViewById(android.R.id.list);
+ mEmptyView = (TextView) getView().findViewById(android.R.id.empty);
+ listView.setEmptyView(mEmptyView);
+ listView.setDivider(null);
Finnur 2015/11/25 11:30:22 nit: line break after this.
dmurph 2015/11/25 23:47:46 Done.
+ mClearButton = (Button) getView().findViewById(R.id.clear_button);
+ if (mClearButton != null) {
+ mClearButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (getActivity() == null)
+ return;
Finnur 2015/11/25 11:30:22 nit: line break after this.
dmurph 2015/11/25 23:47:46 Done.
+ long totalUsage = 0;
+ for (WebsitePreference preference : mWebsites) {
Finnur 2015/11/24 16:39:53 I'm a little concerned about deleting from a poten
dmurph 2015/11/25 23:47:46 Done.
+ totalUsage += preference.site().getTotalUsage();
+ }
Finnur 2015/11/25 11:30:22 nit: line break after this?
dmurph 2015/11/25 23:47:46 Done.
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ // Add the buttons
+ builder.setPositiveButton(
+ R.string.storage_clear_dialog_clear_storage_option,
+ new DialogInterface.OnClickListener() {
Finnur 2015/11/24 16:39:53 I think the code would benefit from having the han
dmurph 2015/11/25 23:47:46 Yes definitely.
+ // We've clicked the 'clear all site storage' button.
+ public void onClick(DialogInterface dialog, int id) {
+ if (mWebsites == null) {
+ return;
+ }
+ final int[] numLeft = new int[1];
+ numLeft[0] = mWebsites.size();
+ for (WebsitePreference preference : mWebsites) {
+ preference.site().clearAllStoredData(new StoredDataClearedCallback() {
+ @Override
+ public void onStoredDataCleared() {
+ if (--numLeft[0] <= 0) {
+ getInfoForOrigins();
+ }
+ }
+ });
+ }
+ }
+ });
+ builder.setNeutralButton(
+ R.string.storage_clear_dialog_reset_app_option,
+ new DialogInterface.OnClickListener() {
+ // We've clicked the 'reset all app data' button.
+ public void onClick(DialogInterface dialog, int id) {
+ if (getActivity() == null)
+ return;
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ int currentapiVersion = android.os.Build.VERSION.SDK_INT;
+
+ boolean success = false;
+ if (currentapiVersion >= android.os.Build.VERSION_CODES.KITKAT) {
+ ActivityManager result =
+ (ActivityManager) getContext().getSystemService(
+ Context.ACTIVITY_SERVICE);
+ success = result == null ? false : result.clearApplicationUserData();
+ }
+ if (currentapiVersion < android.os.Build.VERSION_CODES.KITKAT
+ || !success) {
+ File cache = getActivity().getCacheDir();
+ File appDir = new File(cache.getParent());
+ if (appDir.exists()) {
+ String[] children = appDir.list();
+ for (String s : children) {
+ if (!s.equals("lib")) {
+ deleteDir(new File(appDir, s));
+ }
+ }
+ }
+ getActivity().finishAffinity();
+ System.exit(0);
+ }
+ }
+ });
+ builder.setNegativeButton(
+ R.string.cancel, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {}
+ });
+ builder.setTitle(R.string.storage_reset_app_dialog_title);
+ builder.setMessage(R.string.storage_reset_app_dialog_text);
+ AlertDialog dialog2 = builder.create();
Finnur 2015/11/25 11:30:22 Oh, man. So many dialogs. It's hard to review with
dmurph 2015/11/25 23:47:46 Moved to a separate file.
+ dialog2.show();
+ }
+ });
+ builder.setTitle(R.string.storage_clear_dialog_title);
+ Resources res = getResources();
+ String dialogFormattedText = res.getString(
+ R.string.storage_clear_dialog_text,
+ Formatter.formatShortFileSize(getContext(), totalUsage));
+
+ builder.setMessage(dialogFormattedText);
+ AlertDialog dialog = builder.create();
+ dialog.show();
Finnur 2015/11/25 11:30:22 builder.create().show()?
dmurph 2015/11/25 23:47:46 Done.
+ }
+ });
+ }
Finnur 2015/11/24 16:39:53 Most of this probably belongs in a helper function
Finnur 2015/11/25 11:30:22 Or, actually, perhaps the whole dialog structure c
dmurph 2015/11/25 23:47:46 Done.
String title = getArguments().getString(EXTRA_TITLE);
if (title != null) getActivity().setTitle(title);
@@ -307,22 +439,21 @@ public class SingleCategoryPreferences extends PreferenceFragment
MenuItem searchItem = menu.findItem(R.id.search);
mSearchView = (SearchView) MenuItemCompat.getActionView(searchItem);
mSearchView.setImeOptions(EditorInfo.IME_FLAG_NO_FULLSCREEN);
- SearchView.OnQueryTextListener queryTextListener =
- new SearchView.OnQueryTextListener() {
- @Override
- public boolean onQueryTextSubmit(String query) {
- return true;
- }
+ SearchView.OnQueryTextListener queryTextListener = new SearchView.OnQueryTextListener() {
+ @Override
+ public boolean onQueryTextSubmit(String query) {
+ return true;
+ }
- @Override
- public boolean onQueryTextChange(String query) {
- if (query.equals(mSearch)) return true;
+ @Override
+ public boolean onQueryTextChange(String query) {
+ if (query.equals(mSearch)) return true;
- mSearch = query;
- getInfoForOrigins();
- return true;
- }
- };
+ mSearch = query;
+ getInfoForOrigins();
+ return true;
+ }
+ };
mSearchView.setOnQueryTextListener(queryTextListener);
if (mCategory.showProtectedMediaSites()) {
@@ -397,20 +528,20 @@ public class SingleCategoryPreferences extends PreferenceFragment
// Categories that support adding exceptions also manage the 'Add site' preference.
if (mCategory.showJavaScriptSites()) {
if ((boolean) newValue) {
- Preference addException = getPreferenceScreen().findPreference(
- ADD_EXCEPTION_KEY);
- if (addException != null) { // Can be null in testing.
+ Preference addException =
+ getPreferenceScreen().findPreference(ADD_EXCEPTION_KEY);
+ if (addException != null) { // Can be null in testing.
getPreferenceScreen().removePreference(addException);
}
} else {
- getPreferenceScreen().addPreference(
- new AddExceptionPreference(getActivity(), ADD_EXCEPTION_KEY,
- getAddExceptionDialogMessage(), this));
+ getPreferenceScreen().addPreference(new AddExceptionPreference(getActivity(),
+ ADD_EXCEPTION_KEY, getAddExceptionDialogMessage(), this));
}
}
- ChromeSwitchPreference globalToggle = (ChromeSwitchPreference)
- getPreferenceScreen().findPreference(READ_WRITE_TOGGLE_KEY);
+ ChromeSwitchPreference globalToggle =
+ (ChromeSwitchPreference) getPreferenceScreen().findPreference(
+ READ_WRITE_TOGGLE_KEY);
updateAllowedHeader(mAllowedSiteCount, !globalToggle.isChecked());
getInfoForOrigins();
@@ -432,7 +563,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
// OnPreferenceClickListener:
@Override
public boolean onPreferenceClick(Preference preference) {
- if (ALLOWED_GROUP.equals(preference.getKey())) {
+ if (ALLOWED_GROUP.equals(preference.getKey())) {
mAllowListExpanded = !mAllowListExpanded;
} else {
mBlockListExpanded = !mBlockListExpanded;
@@ -452,14 +583,14 @@ public class SingleCategoryPreferences extends PreferenceFragment
@Override
public void onAddSite(String hostname) {
PrefServiceBridge.getInstance().nativeSetContentSettingForPattern(
- mCategory.toContentSettingsType(), hostname,
- ContentSetting.ALLOW.toInt());
+ mCategory.toContentSettingsType(), hostname, ContentSetting.ALLOW.toInt());
Toast.makeText(getActivity(),
- String.format(getActivity().getString(
- R.string.website_settings_add_site_toast),
- hostname),
- Toast.LENGTH_SHORT).show();
+ String.format(
+ getActivity().getString(R.string.website_settings_add_site_toast),
+ hostname),
+ Toast.LENGTH_SHORT)
+ .show();
getInfoForOrigins();
}
@@ -476,21 +607,21 @@ public class SingleCategoryPreferences extends PreferenceFragment
configureGlobalToggles();
if ((mCategory.showJavaScriptSites()
- && !PrefServiceBridge.getInstance().javaScriptEnabled())) {
- getPreferenceScreen().addPreference(
- new AddExceptionPreference(getActivity(), ADD_EXCEPTION_KEY,
- getAddExceptionDialogMessage(), this));
+ && !PrefServiceBridge.getInstance().javaScriptEnabled())) {
+ getPreferenceScreen().addPreference(new AddExceptionPreference(
+ getActivity(), ADD_EXCEPTION_KEY, getAddExceptionDialogMessage(), this));
}
}
private void configureGlobalToggles() {
// Only some have a global toggle at the top.
- ChromeSwitchPreference globalToggle = (ChromeSwitchPreference)
- getPreferenceScreen().findPreference(READ_WRITE_TOGGLE_KEY);
+ ChromeSwitchPreference globalToggle =
+ (ChromeSwitchPreference) getPreferenceScreen().findPreference(
+ READ_WRITE_TOGGLE_KEY);
// Configure/hide the third-party cookie toggle, as needed.
- Preference thirdPartyCookies = getPreferenceScreen().findPreference(
- THIRD_PARTY_COOKIES_TOGGLE_KEY);
+ Preference thirdPartyCookies =
+ getPreferenceScreen().findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY);
if (mCategory.showCookiesSites()) {
thirdPartyCookies.setOnPreferenceChangeListener(this);
updateThirdPartyCookiesCheckBox();
@@ -504,8 +635,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
getPreferenceScreen().findPreference(EXPLAIN_PROTECTED_MEDIA_KEY));
}
- if (mCategory.showAllSites()
- || mCategory.showStorageSites()) {
+ if (mCategory.showAllSites() || mCategory.showStorageSites()) {
getPreferenceScreen().removePreference(globalToggle);
getPreferenceScreen().removePreference(
getPreferenceScreen().findPreference(ALLOWED_GROUP));
@@ -519,11 +649,9 @@ public class SingleCategoryPreferences extends PreferenceFragment
}
mGroupByAllowBlock = true;
PreferenceGroup allowedGroup =
- (PreferenceGroup) getPreferenceScreen().findPreference(
- ALLOWED_GROUP);
+ (PreferenceGroup) getPreferenceScreen().findPreference(ALLOWED_GROUP);
PreferenceGroup blockedGroup =
- (PreferenceGroup) getPreferenceScreen().findPreference(
- BLOCKED_GROUP);
+ (PreferenceGroup) getPreferenceScreen().findPreference(BLOCKED_GROUP);
if (mCategory.showPermissionBlockedMessage(getActivity())) {
getPreferenceScreen().removePreference(globalToggle);
@@ -533,14 +661,14 @@ public class SingleCategoryPreferences extends PreferenceFragment
// Show the link to system settings since permission is disabled.
ChromeBasePreference osWarning = new ChromeBasePreference(getActivity(), null);
ChromeBasePreference osWarningExtra = new ChromeBasePreference(getActivity(), null);
- mCategory.configurePermissionIsOffPreferences(osWarning, osWarningExtra,
- getActivity(), true);
+ mCategory.configurePermissionIsOffPreferences(
+ osWarning, osWarningExtra, getActivity(), true);
if (osWarning.getTitle() != null) {
getPreferenceScreen().addPreference(osWarning);
- }
- if (osWarningExtra.getTitle() != null) {
- getPreferenceScreen().addPreference(osWarningExtra);
- }
+ }
+ if (osWarningExtra.getTitle() != null) {
+ getPreferenceScreen().addPreference(osWarningExtra);
+ }
Finnur 2015/11/25 11:30:22 The indentation here and below seems incorrect to
dmurph 2015/11/25 23:47:46 This was done with git cl format without me realiz
newt (away) 2015/12/09 01:00:44 Unfortunately, "git cl format" doesn't really work
} else {
allowedGroup.setOnPreferenceClickListener(this);
blockedGroup.setOnPreferenceClickListener(this);
@@ -553,46 +681,43 @@ public class SingleCategoryPreferences extends PreferenceFragment
&& PrefServiceBridge.getInstance().isLocationAllowedByPolicy()) {
globalToggle.setSummaryOn(
ContentSettingsResources.getGeolocationAllowedSummary());
- } else {
- globalToggle.setSummaryOn(
- ContentSettingsResources.getEnabledSummary(contentType));
- }
- globalToggle.setSummaryOff(
- ContentSettingsResources.getDisabledSummary(contentType));
- if (mCategory.isManaged() && !mCategory.isManagedByCustodian()) {
- globalToggle.setIcon(R.drawable.controlled_setting_mandatory);
- }
- if (mCategory.showCameraSites()) {
- globalToggle.setChecked(PrefServiceBridge.getInstance().isCameraEnabled());
- } else if (mCategory.showGeolocationSites()) {
- globalToggle.setChecked(
- LocationSettings.getInstance().isChromeLocationSettingEnabled());
- } else if (mCategory.showCookiesSites()) {
- globalToggle.setChecked(
- PrefServiceBridge.getInstance().isAcceptCookiesEnabled());
- } else if (mCategory.showFullscreenSites()) {
- globalToggle.setChecked(
- PrefServiceBridge.getInstance().isFullscreenAllowed());
- } else if (mCategory.showJavaScriptSites()) {
- globalToggle.setChecked(PrefServiceBridge.getInstance().javaScriptEnabled());
- } else if (mCategory.showMicrophoneSites()) {
- globalToggle.setChecked(PrefServiceBridge.getInstance().isMicEnabled());
- } else if (mCategory.showPopupSites()) {
- globalToggle.setChecked(PrefServiceBridge.getInstance().popupsEnabled());
- } else if (mCategory.showNotificationsSites()) {
- globalToggle.setChecked(
- PrefServiceBridge.getInstance().isPushNotificationsEnabled());
- } else if (mCategory.showProtectedMediaSites()) {
- globalToggle.setChecked(
- PrefServiceBridge.getInstance().isProtectedMediaIdentifierEnabled());
- }
+ } else {
+ globalToggle.setSummaryOn(ContentSettingsResources.getEnabledSummary(contentType));
+ }
+ globalToggle.setSummaryOff(ContentSettingsResources.getDisabledSummary(contentType));
+ if (mCategory.isManaged() && !mCategory.isManagedByCustodian()) {
+ globalToggle.setIcon(R.drawable.controlled_setting_mandatory);
+ }
+ if (mCategory.showCameraSites()) {
+ globalToggle.setChecked(PrefServiceBridge.getInstance().isCameraEnabled());
+ } else if (mCategory.showGeolocationSites()) {
+ globalToggle.setChecked(
+ LocationSettings.getInstance().isChromeLocationSettingEnabled());
+ } else if (mCategory.showCookiesSites()) {
+ globalToggle.setChecked(PrefServiceBridge.getInstance().isAcceptCookiesEnabled());
+ } else if (mCategory.showFullscreenSites()) {
+ globalToggle.setChecked(PrefServiceBridge.getInstance().isFullscreenAllowed());
+ } else if (mCategory.showJavaScriptSites()) {
+ globalToggle.setChecked(PrefServiceBridge.getInstance().javaScriptEnabled());
+ } else if (mCategory.showMicrophoneSites()) {
+ globalToggle.setChecked(PrefServiceBridge.getInstance().isMicEnabled());
+ } else if (mCategory.showPopupSites()) {
+ globalToggle.setChecked(PrefServiceBridge.getInstance().popupsEnabled());
+ } else if (mCategory.showNotificationsSites()) {
+ globalToggle.setChecked(
+ PrefServiceBridge.getInstance().isPushNotificationsEnabled());
+ } else if (mCategory.showProtectedMediaSites()) {
+ globalToggle.setChecked(
+ PrefServiceBridge.getInstance().isProtectedMediaIdentifierEnabled());
+ }
}
}
}
private void updateThirdPartyCookiesCheckBox() {
- ChromeBaseCheckBoxPreference thirdPartyCookiesPref = (ChromeBaseCheckBoxPreference)
- getPreferenceScreen().findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY);
+ ChromeBaseCheckBoxPreference thirdPartyCookiesPref =
+ (ChromeBaseCheckBoxPreference) getPreferenceScreen().findPreference(
newt (away) 2015/11/25 15:56:25 I think it's better to avoid formatting changes un
dmurph 2015/11/25 23:47:46 As I mentioned in the email, this was a mistake wh
+ THIRD_PARTY_COOKIES_TOGGLE_KEY);
thirdPartyCookiesPref.setEnabled(PrefServiceBridge.getInstance().isAcceptCookiesEnabled());
thirdPartyCookiesPref.setManagedPreferenceDelegate(new ManagedPreferenceDelegate() {
@Override

Powered by Google App Engine
This is Rietveld 408576698