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

Unified Diff: chrome/browser/views/clear_browsing_data.cc

Issue 524026: Adds "Delete Local Storage" option to "Clear Browsing Data" for Windows and G... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/clear_browsing_data.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/clear_browsing_data.cc
===================================================================
--- chrome/browser/views/clear_browsing_data.cc (revision 36077)
+++ chrome/browser/views/clear_browsing_data.cc (working copy)
@@ -44,6 +44,7 @@
: del_history_checkbox_(NULL),
del_downloads_checkbox_(NULL),
del_cache_checkbox_(NULL),
+ del_local_storage_checkbox_(NULL),
del_cookies_checkbox_(NULL),
del_passwords_checkbox_(NULL),
del_form_data_checkbox_(NULL),
@@ -94,6 +95,10 @@
AddCheckbox(l10n_util::GetString(IDS_DEL_CACHE_CHKBOX),
profile_->GetPrefs()->GetBoolean(prefs::kDeleteCache));
+ del_local_storage_checkbox_ =
+ AddCheckbox(l10n_util::GetString(IDS_DEL_LOCAL_STORAGE_CHKBOX),
+ profile_->GetPrefs()->GetBoolean(prefs::kDeleteLocalStorage));
+
del_cookies_checkbox_ =
AddCheckbox(l10n_util::GetString(IDS_DEL_COOKIES_CHKBOX),
profile_->GetPrefs()->GetBoolean(prefs::kDeleteCookies));
@@ -158,10 +163,17 @@
kRelatedControlVerticalSpacing,
sz.width(), sz.height());
+ sz = del_local_storage_checkbox_->GetPreferredSize();
+ del_local_storage_checkbox_->SetBounds(2 * kPanelHorizMargin,
+ del_cache_checkbox_->y() +
+ del_cache_checkbox_->height() +
+ kRelatedControlVerticalSpacing,
+ sz.width(), sz.height());
+
sz = del_cookies_checkbox_->GetPreferredSize();
del_cookies_checkbox_->SetBounds(2 * kPanelHorizMargin,
- del_cache_checkbox_->y() +
- del_cache_checkbox_->height() +
+ del_local_storage_checkbox_->y() +
+ del_local_storage_checkbox_->height() +
kRelatedControlVerticalSpacing,
sz.width(), sz.height());
@@ -268,6 +280,7 @@
return del_history_checkbox_->checked() ||
del_downloads_checkbox_->checked() ||
del_cache_checkbox_->checked() ||
+ del_local_storage_checkbox_->checked() ||
del_cookies_checkbox_->checked() ||
del_passwords_checkbox_->checked() ||
del_form_data_checkbox_->checked();
@@ -354,6 +367,9 @@
else if (sender == del_cache_checkbox_)
profile_->GetPrefs()->SetBoolean(prefs::kDeleteCache,
del_cache_checkbox_->checked() ? true : false);
+ else if (sender == del_local_storage_checkbox_)
+ profile_->GetPrefs()->SetBoolean(prefs::kDeleteLocalStorage,
+ del_local_storage_checkbox_->checked() ? true : false);
else if (sender == del_cookies_checkbox_)
profile_->GetPrefs()->SetBoolean(prefs::kDeleteCookies,
del_cookies_checkbox_->checked() ? true : false);
@@ -387,6 +403,7 @@
del_history_checkbox_->SetEnabled(!delete_in_progress_);
del_downloads_checkbox_->SetEnabled(!delete_in_progress_);
del_cache_checkbox_->SetEnabled(!delete_in_progress_);
+ del_local_storage_checkbox_->SetEnabled(!delete_in_progress_);
del_cookies_checkbox_->SetEnabled(!delete_in_progress_);
del_passwords_checkbox_->SetEnabled(!delete_in_progress_);
del_form_data_checkbox_->SetEnabled(!delete_in_progress_);
@@ -425,6 +442,8 @@
remove_mask |= BrowsingDataRemover::REMOVE_FORM_DATA;
if (IsCheckBoxEnabledAndSelected(del_cache_checkbox_))
remove_mask |= BrowsingDataRemover::REMOVE_CACHE;
+ if (IsCheckBoxEnabledAndSelected(del_local_storage_checkbox_))
+ remove_mask |= BrowsingDataRemover::REMOVE_LOCAL_STORAGE;
delete_in_progress_ = true;
UpdateControlEnabledState();
« no previous file with comments | « chrome/browser/views/clear_browsing_data.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698