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

Unified Diff: ipc/ipc_logging.cc

Issue 1127153003: ipc: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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 | « ipc/ipc_channel_unittest.cc ('k') | ipc/ipc_perftest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_logging.cc
diff --git a/ipc/ipc_logging.cc b/ipc/ipc_logging.cc
index 65d88901d93c7cdc9fe743a71277c0e45add7d6d..3db4e676d15c50911d280bad7f42b721dc545e71 100644
--- a/ipc/ipc_logging.cc
+++ b/ipc/ipc_logging.cc
@@ -13,9 +13,10 @@
#include "base/command_line.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "ipc/ipc_message_utils.h"
@@ -161,7 +162,7 @@ void Logging::OnPostDispatchMessage(const Message& message,
if (base::MessageLoop::current() == main_thread_) {
Log(data);
} else {
- main_thread_->PostTask(
+ main_thread_->task_runner()->PostTask(
FROM_HERE, base::Bind(&Logging::Log, base::Unretained(this), data));
}
}
@@ -231,9 +232,8 @@ void Logging::Log(const LogData& data) {
queued_logs_.push_back(data);
if (!queue_invoke_later_pending_) {
queue_invoke_later_pending_ = true;
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&Logging::OnSendLogs, base::Unretained(this)),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&Logging::OnSendLogs, base::Unretained(this)),
base::TimeDelta::FromMilliseconds(kLogSendDelayMs));
}
}
« no previous file with comments | « ipc/ipc_channel_unittest.cc ('k') | ipc/ipc_perftest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698