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

Unified Diff: services/tracing/public/cpp/trace_provider_impl.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
« no previous file with comments | « services/shell/standalone/tracer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/tracing/public/cpp/trace_provider_impl.cc
diff --git a/services/tracing/public/cpp/trace_provider_impl.cc b/services/tracing/public/cpp/trace_provider_impl.cc
index 08a80110869dcdc7203c75deaf25c4b0610dcec1..97e5c42c0a4084c5c162c68091190d5ca96bf76f 100644
--- a/services/tracing/public/cpp/trace_provider_impl.cc
+++ b/services/tracing/public/cpp/trace_provider_impl.cc
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "base/trace_event/trace_config.h"
#include "base/trace_event/trace_event.h"
@@ -59,7 +60,7 @@ void TraceProviderImpl::ForceEnableTracing() {
base::trace_event::TraceConfig("*", base::trace_event::RECORD_UNTIL_FULL),
base::trace_event::TraceLog::RECORDING_MODE);
tracing_forced_ = true;
- base::MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->task_runner()->PostTask(
FROM_HERE,
base::Bind(&TraceProviderImpl::DelayedStop, weak_factory_.GetWeakPtr()));
}
@@ -69,7 +70,7 @@ void TraceProviderImpl::DelayedStop() {
// method (within which TraceProviderImpl is created) takes more than one
// second to finish; thus we start the countdown only when the current thread
// is unblocked.
- base::MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->task_runner()->PostDelayedTask(
FROM_HERE,
base::Bind(&TraceProviderImpl::StopIfForced, weak_factory_.GetWeakPtr()),
base::TimeDelta::FromSeconds(1));
« no previous file with comments | « services/shell/standalone/tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698