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

Side by Side Diff: chrome/browser/ui/webui/options/clear_browser_data_handler.cc

Issue 7717023: Rename REMOVE_COOKIES to REMOVE_SITE_DATA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased onto ToT. Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" 5 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 Profile* profile = Profile::FromWebUI(web_ui_); 93 Profile* profile = Profile::FromWebUI(web_ui_);
94 PrefService* prefs = profile->GetPrefs(); 94 PrefService* prefs = profile->GetPrefs();
95 95
96 int remove_mask = 0; 96 int remove_mask = 0;
97 if (prefs->GetBoolean(prefs::kDeleteBrowsingHistory)) 97 if (prefs->GetBoolean(prefs::kDeleteBrowsingHistory))
98 remove_mask |= BrowsingDataRemover::REMOVE_HISTORY; 98 remove_mask |= BrowsingDataRemover::REMOVE_HISTORY;
99 if (prefs->GetBoolean(prefs::kDeleteDownloadHistory)) 99 if (prefs->GetBoolean(prefs::kDeleteDownloadHistory))
100 remove_mask |= BrowsingDataRemover::REMOVE_DOWNLOADS; 100 remove_mask |= BrowsingDataRemover::REMOVE_DOWNLOADS;
101 if (prefs->GetBoolean(prefs::kDeleteCache)) 101 if (prefs->GetBoolean(prefs::kDeleteCache))
102 remove_mask |= BrowsingDataRemover::REMOVE_CACHE; 102 remove_mask |= BrowsingDataRemover::REMOVE_CACHE;
103 if (prefs->GetBoolean(prefs::kDeleteCookies)) { 103 if (prefs->GetBoolean(prefs::kDeleteCookies))
104 remove_mask |= BrowsingDataRemover::REMOVE_COOKIES; 104 remove_mask |= BrowsingDataRemover::REMOVE_SITE_DATA;
105 if (*clear_plugin_lso_data_enabled_)
106 remove_mask |= BrowsingDataRemover::REMOVE_LSO_DATA;
107 }
108 if (prefs->GetBoolean(prefs::kDeletePasswords)) 105 if (prefs->GetBoolean(prefs::kDeletePasswords))
109 remove_mask |= BrowsingDataRemover::REMOVE_PASSWORDS; 106 remove_mask |= BrowsingDataRemover::REMOVE_PASSWORDS;
110 if (prefs->GetBoolean(prefs::kDeleteFormData)) 107 if (prefs->GetBoolean(prefs::kDeleteFormData))
111 remove_mask |= BrowsingDataRemover::REMOVE_FORM_DATA; 108 remove_mask |= BrowsingDataRemover::REMOVE_FORM_DATA;
112 109
113 int period_selected = prefs->GetInteger(prefs::kDeleteTimePeriod); 110 int period_selected = prefs->GetInteger(prefs::kDeleteTimePeriod);
114 111
115 base::FundamentalValue state(true); 112 base::FundamentalValue state(true);
116 web_ui_->CallJavascriptFunction("ClearBrowserDataOverlay.setClearingState", 113 web_ui_->CallJavascriptFunction("ClearBrowserDataOverlay.setClearingState",
117 state); 114 state);
(...skipping 11 matching lines...) Expand all
129 remover_->Remove(remove_mask); 126 remover_->Remove(remove_mask);
130 } 127 }
131 128
132 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { 129 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() {
133 // No need to remove ourselves as an observer as BrowsingDataRemover deletes 130 // No need to remove ourselves as an observer as BrowsingDataRemover deletes
134 // itself after we return. 131 // itself after we return.
135 remover_ = NULL; 132 remover_ = NULL;
136 DCHECK(web_ui_); 133 DCHECK(web_ui_);
137 web_ui_->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); 134 web_ui_->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing");
138 } 135 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc ('k') | chrome_frame/delete_chrome_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698