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

Unified Diff: chrome/browser/browsing_data_remover.h

Issue 218001: BrowsingDataRemover* should not be scoped. (Closed)
Patch Set: Make BrowsingDataRemover destructor private Created 11 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/dom_ui/history_ui.h » ('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 0425c6f6a7baad15ec8ab4b9f703940ac8962601..1e5054c2a24cba861353adf93d2af65b3ded1128 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -52,7 +52,6 @@ class BrowsingDataRemover : public NotificationObserver {
// profile in the specified time range.
BrowsingDataRemover(Profile* profile, TimePeriod time_period,
base::Time delete_end);
- ~BrowsingDataRemover();
// Removes the specified items related to browsing.
void Remove(int remove_mask);
@@ -66,6 +65,12 @@ class BrowsingDataRemover : public NotificationObserver {
static bool is_removing() { return removing_; }
private:
+ // BrowsingDataRemover deletes itself (using DeleteTask) and is not supposed
+ // to be deleted by other objects so make destructor private and DeleteTask
+ // a friend.
+ friend class DeleteTask<BrowsingDataRemover>;
+ ~BrowsingDataRemover();
+
// NotificationObserver method. Callback when TemplateURLModel has finished
// loading. Deletes the entries from the model, and if we're not waiting on
// anything else notifies observers and deletes this BrowsingDataRemover.
« no previous file with comments | « no previous file | chrome/browser/dom_ui/history_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698