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

Unified Diff: services/shell/standalone/tracer.cc

Issue 2091443002: Remove calls to deprecated MessageLoop methods in services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: services/shell/standalone/tracer.cc
diff --git a/services/shell/standalone/tracer.cc b/services/shell/standalone/tracer.cc
index 2edf844e95bd8d3afeea46cb544533f9e6db2f33..cd6f3bcd0f8752b85a2de0a846ffaab8c30855ab 100644
--- a/services/shell/standalone/tracer.cc
+++ b/services/shell/standalone/tracer.cc
@@ -10,6 +10,7 @@
#include <utility>
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
@@ -42,7 +43,7 @@ void Tracer::Start(const std::string& categories,
<< "Could not parse --trace-startup-duration value "
<< duration_seconds_str;
}
- base::MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->task_runner()->PostDelayedTask(
FROM_HERE,
base::Bind(&Tracer::StopAndFlushToFile, base::Unretained(this)),
base::TimeDelta::FromSeconds(trace_duration_secs));
@@ -94,7 +95,7 @@ void Tracer::StopTracingAndFlushToDisk() {
// Spin up a new thread to flush things out.
base::Thread flush_thread("mojo_runner_trace_event_flush");
flush_thread.Start();
- flush_thread.message_loop()->PostTask(
+ flush_thread.task_runner()->PostTask(
FROM_HERE,
base::Bind(&Tracer::EndTraceAndFlush, base::Unretained(this),
trace_filename_,
« no previous file with comments | « services/shell/standalone/desktop/launcher_process.cc ('k') | services/tracing/public/cpp/trace_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698