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

Unified Diff: content/public/browser/browser_thread.h

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. 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
« no previous file with comments | « content/gpu/gpu_watchdog_thread.cc ('k') | content/public/browser/devtools_agent_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_thread.h
diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h
index 9473c2cd386c78f8e44c7a1e2a3d918f2f13ed6a..a68903dab9a59fb245f56ab197894f6251b219b2 100644
--- a/content/public/browser/browser_thread.h
+++ b/content/public/browser/browser_thread.h
@@ -11,7 +11,7 @@
#include "base/callback.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "base/task_runner_util.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
@@ -88,7 +88,7 @@ class CONTENT_EXPORT BrowserThread {
// NOTE: do not add new threads here that are only used by a small number of
// files. Instead you should just use a Thread class and pass its
- // MessageLoopProxy around. Named threads there are only for threads that
+ // task runner around. Named threads there are only for threads that
// are used in many places.
// This identifier does not represent a thread. Instead it counts the
@@ -130,10 +130,10 @@ class CONTENT_EXPORT BrowserThread {
const tracked_objects::Location& from_here,
const base::Callback<ReturnType(void)>& task,
const base::Callback<void(ReplyArgType)>& reply) {
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy =
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner =
GetMessageLoopProxyForThread(identifier);
- return base::PostTaskAndReplyWithResult(
- message_loop_proxy.get(), from_here, task, reply);
+ return base::PostTaskAndReplyWithResult(task_runner.get(), from_here, task,
+ reply);
}
template <class T>
@@ -216,10 +216,10 @@ class CONTENT_EXPORT BrowserThread {
// sets identifier to its ID. Otherwise returns false.
static bool GetCurrentThreadIdentifier(ID* identifier) WARN_UNUSED_RESULT;
- // Callers can hold on to a refcounted MessageLoopProxy beyond the lifetime
+ // Callers can hold on to a refcounted task runner beyond the lifetime
// of the thread.
- static scoped_refptr<base::MessageLoopProxy> GetMessageLoopProxyForThread(
- ID identifier);
+ static scoped_refptr<base::SingleThreadTaskRunner>
+ GetMessageLoopProxyForThread(ID identifier);
// Returns a pointer to the thread's message loop, which will become
// invalid during shutdown, so you probably shouldn't hold onto it.
« no previous file with comments | « content/gpu/gpu_watchdog_thread.cc ('k') | content/public/browser/devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698