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

Unified Diff: components/feedback/tracing_manager.cc

Issue 1144153004: components: 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 | « components/enhanced_bookmarks/enhanced_bookmark_model.cc ('k') | components/gcm_driver/fake_gcm_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/feedback/tracing_manager.cc
diff --git a/components/feedback/tracing_manager.cc b/components/feedback/tracing_manager.cc
index b3ee5f44de124611ed24dc67377deeda3114fde3..7b116c2902d24a6505b480154b4d603bf7a26c51 100644
--- a/components/feedback/tracing_manager.cc
+++ b/components/feedback/tracing_manager.cc
@@ -5,8 +5,10 @@
#include "components/feedback/tracing_manager.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "components/feedback/feedback_util.h"
#include "content/public/browser/tracing_controller.h"
@@ -66,9 +68,8 @@ bool TracingManager::GetTraceData(int id, const TraceDataCallback& callback) {
return false;
// Always return the data asychronously, so the behavior is consistant.
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(callback, data->second));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, data->second));
return true;
}
}
@@ -117,10 +118,9 @@ void TracingManager::OnTraceDataCollected(base::RefCountedString* trace_data) {
// Tracing has to be restarted asynchronous, so the TracingController can
// clean up.
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(&TracingManager::StartTracing,
- weak_ptr_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&TracingManager::StartTracing,
+ weak_ptr_factory_.GetWeakPtr()));
}
// static
« no previous file with comments | « components/enhanced_bookmarks/enhanced_bookmark_model.cc ('k') | components/gcm_driver/fake_gcm_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698