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

Unified Diff: content/browser/tracing/etw_tracing_agent_win.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/browser/tracing/etw_tracing_agent_win.cc
diff --git a/content/browser/tracing/etw_tracing_agent_win.cc b/content/browser/tracing/etw_tracing_agent_win.cc
index d09e2b3b6df6b6310fe63df2d7770c3b03411ae0..0b934a611f477e2dd4e4a6ce4cef24a9748394c3 100644
--- a/content/browser/tracing/etw_tracing_agent_win.cc
+++ b/content/browser/tracing/etw_tracing_agent_win.cc
@@ -10,6 +10,7 @@
#include "base/json/json_string_value_serializer.h"
#include "base/lazy_instance.h"
#include "base/memory/singleton.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
@@ -63,10 +64,9 @@ void EtwTracingAgent::StartAgentTracing(
// Start the consumer thread and start consuming events.
thread_.Start();
- thread_.message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&EtwTracingAgent::TraceAndConsumeOnThread,
- base::Unretained(this)));
+ thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&EtwTracingAgent::TraceAndConsumeOnThread,
+ base::Unretained(this)));
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
@@ -81,10 +81,9 @@ void EtwTracingAgent::StopAgentTracing(
}
// Stop consuming and flush events.
- thread_.message_loop()->PostTask(FROM_HERE,
- base::Bind(&EtwTracingAgent::FlushOnThread,
- base::Unretained(this),
- callback));
+ thread_.task_runner()->PostTask(FROM_HERE,
+ base::Bind(&EtwTracingAgent::FlushOnThread,
+ base::Unretained(this), callback));
}
void EtwTracingAgent::OnStopSystemTracingDone(

Powered by Google App Engine
This is Rietveld 408576698