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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 2123653003: Remove calls to MessageLoop::current() in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index ea5e4bc341e1bb6fa2524a3f7a1e4f85b2c32f2c..a32122dbfb6b779fc7a540ee6955488e57abb63c 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -18,6 +18,7 @@
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/rand_util.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/platform_thread.h"
@@ -149,7 +150,7 @@ void PpapiThread::Shutdown() {
bool PpapiThread::Send(IPC::Message* msg) {
// Allow access from multiple threads.
- if (base::MessageLoop::current() == message_loop())
+ if (message_loop()->task_runner()->BelongsToCurrentThread())
return ChildThreadImpl::Send(msg);
return sync_message_filter()->Send(msg);

Powered by Google App Engine
This is Rietveld 408576698