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

Unified Diff: chrome/browser/password_manager/password_store_unittest.cc

Issue 10388186: RefCounted types should not have public destructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « chrome/browser/managed_mode_unittest.cc ('k') | chrome/browser/prerender/prerender_local_predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_store_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_unittest.cc b/chrome/browser/password_manager/password_store_unittest.cc
index 0eb4149eeb32e55c24c94c99165646b85da08d99..a15fbf8fc7fea8b5c6f313999925ea79f9117984 100644
--- a/chrome/browser/password_manager/password_store_unittest.cc
+++ b/chrome/browser/password_manager/password_store_unittest.cc
@@ -56,17 +56,15 @@ class DBThreadObserverHelper
done_event_.Wait();
}
- virtual ~DBThreadObserverHelper() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
- registrar_.RemoveAll();
- }
-
content::NotificationObserverMock& observer() {
return observer_;
}
protected:
- friend class base::RefCountedThreadSafe<DBThreadObserverHelper>;
+ virtual ~DBThreadObserverHelper() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
+ registrar_.RemoveAll();
+ }
void AddObserverTask(PasswordStore* password_store) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
@@ -79,6 +77,10 @@ class DBThreadObserverHelper
WaitableEvent done_event_;
content::NotificationRegistrar registrar_;
content::NotificationObserverMock observer_;
+
+ private:
+ friend struct BrowserThread::DeleteOnThread<BrowserThread::DB>;
+ friend class base::DeleteHelper<DBThreadObserverHelper>;
};
} // anonymous namespace
« no previous file with comments | « chrome/browser/managed_mode_unittest.cc ('k') | chrome/browser/prerender/prerender_local_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698