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

Unified Diff: chrome/browser/profiles/profile_destroyer.h

Issue 15854011: Moving ProfileDestroyer from ref counting to WeakPtr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/profiles/profile_destroyer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_destroyer.h
diff --git a/chrome/browser/profiles/profile_destroyer.h b/chrome/browser/profiles/profile_destroyer.h
index 62aa7c1348bc28552763d373b719dd035eae740e..70a4752420d353cd31cf56af1949e5249ee85cf7 100644
--- a/chrome/browser/profiles/profile_destroyer.h
+++ b/chrome/browser/profiles/profile_destroyer.h
@@ -20,8 +20,7 @@ class RenderProcessHost;
// We use this class to destroy the off the record profile so that we can make
// sure it gets done asynchronously after all render process hosts are gone.
class ProfileDestroyer
- : public content::NotificationObserver,
- public base::RefCounted<ProfileDestroyer> {
+ : public content::NotificationObserver {
public:
static void DestroyProfileWhenAppropriate(Profile* const profile);
static void DestroyOffTheRecordProfileNow(Profile* const profile);
@@ -61,6 +60,8 @@ class ProfileDestroyer
Profile* profile_;
+ base::WeakPtrFactory<ProfileDestroyer> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileDestroyer);
};
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_destroyer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698