Index: base/trace_event/trace_event_memory.cc |
diff --git a/base/trace_event/trace_event_memory.cc b/base/trace_event/trace_event_memory.cc |
index ab8ba0d33373ed1c7ef2d421b72edb5a5cb3b00f..2bf6d38beab0d8659aa92729baee7e61327fddac 100644 |
--- a/base/trace_event/trace_event_memory.cc |
+++ b/base/trace_event/trace_event_memory.cc |
@@ -6,10 +6,9 @@ |
#include "base/debug/leak_annotations.h" |
#include "base/lazy_instance.h" |
-#include "base/location.h" |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/single_thread_task_runner.h" |
+#include "base/message_loop/message_loop.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_util.h" |
#include "base/threading/thread_local_storage.h" |
@@ -145,11 +144,11 @@ |
////////////////////////////////////////////////////////////////////////////// |
TraceMemoryController::TraceMemoryController( |
- scoped_refptr<SingleThreadTaskRunner> task_runner, |
+ scoped_refptr<MessageLoopProxy> message_loop_proxy, |
HeapProfilerStartFunction heap_profiler_start_function, |
HeapProfilerStopFunction heap_profiler_stop_function, |
GetHeapProfileFunction get_heap_profile_function) |
- : task_runner_(task_runner.Pass()), |
+ : message_loop_proxy_(message_loop_proxy), |
heap_profiler_start_function_(heap_profiler_start_function), |
heap_profiler_stop_function_(heap_profiler_stop_function), |
get_heap_profile_function_(get_heap_profile_function), |
@@ -175,9 +174,10 @@ |
if (!enabled) |
return; |
DVLOG(1) << "OnTraceLogEnabled"; |
- task_runner_->PostTask(FROM_HERE, |
- base::Bind(&TraceMemoryController::StartProfiling, |
- weak_factory_.GetWeakPtr())); |
+ message_loop_proxy_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&TraceMemoryController::StartProfiling, |
+ weak_factory_.GetWeakPtr())); |
} |
void TraceMemoryController::OnTraceLogDisabled() { |
@@ -185,9 +185,10 @@ |
// called, so we cannot tell if it was enabled before. Always try to turn |
// off profiling. |
DVLOG(1) << "OnTraceLogDisabled"; |
- task_runner_->PostTask(FROM_HERE, |
- base::Bind(&TraceMemoryController::StopProfiling, |
- weak_factory_.GetWeakPtr())); |
+ message_loop_proxy_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&TraceMemoryController::StopProfiling, |
+ weak_factory_.GetWeakPtr())); |
} |
void TraceMemoryController::StartProfiling() { |