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

Unified Diff: chrome/browser/browsing_data_remover.cc

Issue 7551008: Strawman proposal for chrome.experimental.clear.* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: License presubmit check. :( Created 9 years, 4 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/browsing_data_remover.h ('k') | chrome/browser/extensions/extension_clear_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 56bbd7d972f22335101e0944bdd0cddce9de94da..bd05876db4710dfcb7bf50f070f9595d3c7c7b9d 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -102,9 +102,14 @@ BrowsingDataRemover::~BrowsingDataRemover() {
DCHECK(all_done());
}
+// Static.
+void BrowsingDataRemover::set_removing(bool removing) {
+ DCHECK(removing_ != removing);
+ removing_ = removing;
+}
+
void BrowsingDataRemover::Remove(int remove_mask) {
- DCHECK(!removing_);
- removing_ = true;
+ set_removing(true);
if (remove_mask & REMOVE_HISTORY) {
HistoryService* history_service =
@@ -347,7 +352,7 @@ void BrowsingDataRemover::NotifyAndDeleteIfDone() {
if (g_browser_process->net_log())
g_browser_process->net_log()->ClearAllPassivelyCapturedEvents();
- removing_ = false;
+ set_removing(false);
FOR_EACH_OBSERVER(Observer, observer_list_, OnBrowsingDataRemoverDone());
// History requests aren't happy if you delete yourself from the callback.
« no previous file with comments | « chrome/browser/browsing_data_remover.h ('k') | chrome/browser/extensions/extension_clear_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698