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

Unified Diff: content/browser/android/java/java_bridge_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
« no previous file with comments | « no previous file | content/browser/appcache/appcache_request_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/java/java_bridge_thread.cc
diff --git a/content/browser/android/java/java_bridge_thread.cc b/content/browser/android/java/java_bridge_thread.cc
index 6c69bc0d5716f11a902978659b18238eff20530f..4c8b24edc4012c00b3534d6b5b4e008a89219bad 100644
--- a/content/browser/android/java/java_bridge_thread.cc
+++ b/content/browser/android/java/java_bridge_thread.cc
@@ -6,6 +6,7 @@
#include "base/lazy_instance.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/task_runner_util.h"
#include "build/build_config.h"
@@ -33,8 +34,10 @@ JavaBridgeThread::~JavaBridgeThread() {
// static
bool JavaBridgeThread::CurrentlyOn() {
- return base::MessageLoop::current() ==
- g_background_thread.Get().message_loop();
+ return g_background_thread.Get()
+ .message_loop()
+ ->task_runner()
+ ->BelongsToCurrentThread();
}
// static
« no previous file with comments | « no previous file | content/browser/appcache/appcache_request_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698