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

Unified Diff: chrome/common/worker_thread_ticker_unittest.cc

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. Created 5 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/common/worker_thread_ticker_unittest.cc
diff --git a/chrome/common/worker_thread_ticker_unittest.cc b/chrome/common/worker_thread_ticker_unittest.cc
index 4f7dc0d6770c52ea88e7cece45af3777a1e4c72d..dbb2e01180299d50aaacd7953c7fd2fa2daafc88 100644
--- a/chrome/common/worker_thread_ticker_unittest.cc
+++ b/chrome/common/worker_thread_ticker_unittest.cc
@@ -4,7 +4,10 @@
#include "chrome/common/worker_thread_ticker.h"
+#include "base/location.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/platform_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,7 +21,8 @@ class TestCallback : public WorkerThreadTicker::Callback {
counter_++;
// Finish the test faster.
- message_loop_->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ message_loop_->task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
}
int counter() const { return counter_; }
@@ -36,9 +40,8 @@ class LongCallback : public WorkerThreadTicker::Callback {
};
void RunMessageLoopForAWhile() {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::MessageLoop::QuitClosure(),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(500));
base::MessageLoop::current()->Run();
}
« no previous file with comments | « chrome/common/worker_thread_ticker.cc ('k') | chrome/renderer/chrome_content_renderer_client_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698