diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 23:40:50 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 23:40:50 +0000 |
commit | fb90c94fa3047eca1a40cb82441677a5ac49b9e8 (patch) | |
tree | 5956e91c4747fb1d6f04e49d818e5cfc5aa0608f /content/browser/browser_thread_unittest.cc | |
parent | 21b8d16c96464322fbdb8d970c3d0637cceed714 (diff) | |
download | chromium_src-fb90c94fa3047eca1a40cb82441677a5ac49b9e8.zip chromium_src-fb90c94fa3047eca1a40cb82441677a5ac49b9e8.tar.gz chromium_src-fb90c94fa3047eca1a40cb82441677a5ac49b9e8.tar.bz2 |
RefCounted types should not have public destructors, content/browser part 1
BUG=123295
TEST=none
Review URL: http://codereview.chromium.org/10068037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_thread_unittest.cc')
-rw-r--r-- | content/browser/browser_thread_unittest.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc index 6bb8e5a..57a7b52 100644 --- a/content/browser/browser_thread_unittest.cc +++ b/content/browser/browser_thread_unittest.cc @@ -7,6 +7,7 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" +#include "base/sequenced_task_runner_helpers.h" #include "content/browser/browser_thread_impl.h" #include "content/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -46,12 +47,15 @@ class BrowserThreadTest : public testing::Test { explicit DeletedOnFile(MessageLoop* message_loop) : message_loop_(message_loop) { } + private: + friend struct BrowserThread::DeleteOnThread<BrowserThread::FILE>; + friend class base::DeleteHelper<DeletedOnFile>; + ~DeletedOnFile() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); message_loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure()); } - private: MessageLoop* message_loop_; }; @@ -59,6 +63,12 @@ class BrowserThreadTest : public testing::Test { : public base::RefCountedThreadSafe< NeverDeleted, BrowserThread::DeleteOnWebKitThread> { public: + + private: + friend struct BrowserThread::DeleteOnThread< + BrowserThread::WEBKIT_DEPRECATED>; + friend class base::DeleteHelper<NeverDeleted>; + ~NeverDeleted() { CHECK(false); } |