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

Unified Diff: chrome/browser/browsing_data_remover.h

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 | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover.h
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h
index 8f6351af05246bcacf03312eb01dfc2968ce8ab4..870f5e7fe09a67ecc1018fffa99de933ac817182 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -98,6 +98,10 @@ class BrowsingDataRemover : public NotificationObserver,
static bool is_removing() { return removing_; }
private:
+ // The clear API needs to be able to toggle removing_ in order to test that
+ // only one BrowsingDataRemover instance can be called at a time.
+ FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, ClearOneAtATime);
+
enum CacheState {
STATE_NONE,
STATE_CREATE_MAIN,
@@ -175,6 +179,10 @@ class BrowsingDataRemover : public NotificationObserver,
!waiting_for_clear_lso_data_;
}
+ // Setter for removing_; DCHECKs that we can only start removing if we're not
+ // already removing, and vice-versa.
+ static void set_removing(bool removing);
+
NotificationRegistrar registrar_;
// Profile we're to remove from.
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698