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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 2315443002: Make ClearBrowsingDataHandler only observe its own removal task (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browsing_data/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/browsing_data_remover.h
diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h
index 3c2ecb0b5b0d84cd1573bcdbbe4ed25e3b941ec4..ed11fb497bebefe58826c879b0903f856135bf47 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.h
+++ b/chrome/browser/browsing_data/browsing_data_remover.h
@@ -92,21 +92,6 @@ class URLRequestContextGetter;
// }
// }
//
-// 3. Using an observer to report when any removal task started or all removal
-// tasks finished (i.e. when BrowsingDataRemover changes state from idle
-// to busy and vice versa).
-//
-// class BrowsingDataRemoverStatusObsever {
-// BrowsingDataRemoverStatusObserver() { remover->AddObserver(this); }
-// ~BrowsingDataRemoverStatusObserver() {
-// remover->RemoveObserver(this);
-// }
-//
-// void OnBrowsingDataRemoving(bool removing) {
-// LOG(INFO) << "Remover is now " << (removing ? "busy" : "idle");
-// }
-// }
-//
////////////////////////////////////////////////////////////////////////////////
class BrowsingDataRemover : public KeyedService
@@ -202,23 +187,12 @@ class BrowsingDataRemover : public KeyedService
base::Time end;
};
- // Observer is notified when the removal is active and when it's done.
- // TODO(msramek): The semantics of the two methods are slightly different;
- // one is called for every observer at the same time, while the other only
- // for one observer at a time. Split the interface or deprecate
- // OnBrowsingDataRemoving().
+ // Observer is notified when its own removal task is done.
class Observer {
public:
- // NOTE: DEPRECATED; talk to dbeam/msramek before using this.
- //
- // Whether removal is active. Note that not having an active removal is not
- // same as completing a removal. That is why the removing status is separate
- // from the done message.
- virtual void OnBrowsingDataRemoving(bool is_removing) {}
-
// Called when a removal task is finished. Note that every removal task can
// only have one observer attached to it, and only that one is called.
- virtual void OnBrowsingDataRemoverDone() {}
+ virtual void OnBrowsingDataRemoverDone() = 0;
protected:
virtual ~Observer() {}
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698