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

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

Issue 10068036: RefCounted types should not have public destructors, chrome/browser/ part 5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix Created 8 years, 8 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
Index: chrome/browser/profiles/refcounted_profile_keyed_service.h
diff --git a/chrome/browser/profiles/refcounted_profile_keyed_service.h b/chrome/browser/profiles/refcounted_profile_keyed_service.h
index 0db4351f642d1fa661fd976d4e7d4f580cd6393d..a7c41aff451aa40e8ee044141ceff94609546945 100644
--- a/chrome/browser/profiles/refcounted_profile_keyed_service.h
+++ b/chrome/browser/profiles/refcounted_profile_keyed_service.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_PROFILES_REFCOUNTED_PROFILE_KEYED_SERVICE_H_
#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner_helpers.h"
#include "content/public/browser/browser_thread.h"
class RefcountedProfileKeyedService;
@@ -42,10 +43,6 @@ class RefcountedProfileKeyedService
// the UI thread; you do not need to check for that yourself.
virtual void ShutdownOnUIThread() = 0;
- // The second pass destruction can happen anywhere unless you specify which
- // thread this service must be destroyed on by using the second constructor.
- virtual ~RefcountedProfileKeyedService();
-
protected:
// If your service does not need to be deleted on a specific thread, use the
// default constructor.
@@ -57,8 +54,13 @@ class RefcountedProfileKeyedService
explicit RefcountedProfileKeyedService(
const content::BrowserThread::ID thread_id);
+ // The second pass destruction can happen anywhere unless you specify which
+ // thread this service must be destroyed on by using the second constructor.
+ virtual ~RefcountedProfileKeyedService();
+
private:
friend struct impl::RefcountedProfileKeyedServiceTraits;
+ friend class base::DeleteHelper<RefcountedProfileKeyedService>;
// Do we have to delete this object on a specific thread?
bool requires_destruction_on_thread_;
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/safe_browsing/client_side_detection_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698