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

Unified Diff: chrome/browser/chromeos/low_memory_observer.cc

Issue 10386206: RefCounted types should not have public destructors, chromeos edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r143931 Created 8 years, 6 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/chromeos/low_memory_observer.cc
diff --git a/chrome/browser/chromeos/low_memory_observer.cc b/chrome/browser/chromeos/low_memory_observer.cc
index a27602cea86e0e5f8124667708c4ba54dcd7650f..efcb55a0c5c4a1fc1729f77eef075e849337f5b0 100644
--- a/chrome/browser/chromeos/low_memory_observer.cc
+++ b/chrome/browser/chromeos/low_memory_observer.cc
@@ -48,9 +48,6 @@ class LowMemoryObserverImpl
: public base::RefCountedThreadSafe<LowMemoryObserverImpl> {
public:
LowMemoryObserverImpl() : watcher_delegate_(this), file_descriptor_(-1) {}
- ~LowMemoryObserverImpl() {
- StopObservingOnFileThread();
- }
// Start watching the low memory file for readability.
// Calls to StartObserving should always be matched with calls to
@@ -63,6 +60,12 @@ class LowMemoryObserverImpl
void StopObservingOnFileThread();
private:
+ friend class base::RefCountedThreadSafe<LowMemoryObserverImpl>;
+
+ ~LowMemoryObserverImpl() {
+ StopObservingOnFileThread();
+ }
+
// Start a timer to resume watching the low memory file descriptor.
void ScheduleNextObservation();
« no previous file with comments | « chrome/browser/chromeos/login/signed_settings.cc ('k') | chrome/browser/chromeos/media/media_player_extension_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698