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

Unified Diff: chrome/browser/browser_thread_unittest.cc

Issue 3971004: Revert "Revert "Const-ify RefCountedThreadSafe::AddRef and Release."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 2 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/browser_thread.h ('k') | chrome/browser/chrome_plugin_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_thread_unittest.cc
diff --git a/chrome/browser/browser_thread_unittest.cc b/chrome/browser/browser_thread_unittest.cc
index d2c19d8b921b94a7a8b9c2d8af91a2dc0c140d67..948709acc6d1b5ed67973fb99e1e4bcc26ddaae6 100644
--- a/chrome/browser/browser_thread_unittest.cc
+++ b/chrome/browser/browser_thread_unittest.cc
@@ -11,7 +11,7 @@
class BrowserThreadTest : public testing::Test {
public:
- void Release() {
+ void Release() const {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
loop_.PostTask(FROM_HERE, new MessageLoop::QuitTask);
}
@@ -77,7 +77,9 @@ class BrowserThreadTest : public testing::Test {
private:
scoped_ptr<BrowserThread> ui_thread_;
scoped_ptr<BrowserThread> file_thread_;
- MessageLoop loop_;
+ // It's kind of ugly to make this mutable - solely so we can post the Quit
+ // Task from Release(). This should be fixed.
+ mutable MessageLoop loop_;
};
TEST_F(BrowserThreadTest, PostTask) {
« no previous file with comments | « chrome/browser/browser_thread.h ('k') | chrome/browser/chrome_plugin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698