Index: content/browser/browser_thread_unittest.cc |
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc |
index 9b23057f6232d2a3c538f8c10edd647078441c3b..3f1f8cdd2eeae2b3cff0a10a24c4cd130fa067df 100644 |
--- a/content/browser/browser_thread_unittest.cc |
+++ b/content/browser/browser_thread_unittest.cc |
@@ -4,10 +4,10 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
-#include "base/location.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/message_loop/message_loop.h" |
+#include "base/message_loop/message_loop_proxy.h" |
#include "base/sequenced_task_runner_helpers.h" |
-#include "base/single_thread_task_runner.h" |
#include "content/browser/browser_thread_impl.h" |
#include "content/public/test/test_browser_thread.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -19,7 +19,7 @@ class BrowserThreadTest : public testing::Test { |
public: |
void Release() const { |
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- loop_.task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); |
+ loop_.PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); |
} |
protected: |
@@ -37,8 +37,7 @@ class BrowserThreadTest : public testing::Test { |
static void BasicFunction(base::MessageLoop* message_loop) { |
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
- message_loop->task_runner()->PostTask(FROM_HERE, |
- base::MessageLoop::QuitClosure()); |
+ message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); |
} |
class DeletedOnFile |
@@ -54,8 +53,7 @@ class BrowserThreadTest : public testing::Test { |
~DeletedOnFile() { |
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
- message_loop_->task_runner()->PostTask(FROM_HERE, |
- base::MessageLoop::QuitClosure()); |
+ message_loop_->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); |
} |
base::MessageLoop* message_loop_; |
@@ -90,24 +88,24 @@ TEST_F(BrowserThreadTest, ReleasedOnCorrectThread) { |
base::MessageLoop::current()->Run(); |
} |
-TEST_F(BrowserThreadTest, PostTaskViaTaskRunner) { |
- scoped_refptr<base::SingleThreadTaskRunner> task_runner = |
+TEST_F(BrowserThreadTest, PostTaskViaMessageLoopProxy) { |
+ scoped_refptr<base::MessageLoopProxy> message_loop_proxy = |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); |
- task_runner->PostTask( |
+ message_loop_proxy->PostTask( |
FROM_HERE, base::Bind(&BasicFunction, base::MessageLoop::current())); |
base::MessageLoop::current()->Run(); |
} |
-TEST_F(BrowserThreadTest, ReleaseViaTaskRunner) { |
- scoped_refptr<base::SingleThreadTaskRunner> task_runner = |
+TEST_F(BrowserThreadTest, ReleaseViaMessageLoopProxy) { |
+ scoped_refptr<base::MessageLoopProxy> message_loop_proxy = |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); |
- task_runner->ReleaseSoon(FROM_HERE, this); |
+ message_loop_proxy->ReleaseSoon(FROM_HERE, this); |
base::MessageLoop::current()->Run(); |
} |
TEST_F(BrowserThreadTest, PostTaskAndReply) { |
// Most of the heavy testing for PostTaskAndReply() is done inside the |
- // task runner test. This just makes sure we get piped through at all. |
+ // MessageLoopProxy test. This just makes sure we get piped through at all. |
ASSERT_TRUE(BrowserThread::PostTaskAndReply( |
BrowserThread::FILE, |
FROM_HERE, |