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

Unified Diff: base/debug/trace_event_memory.h

Issue 369703003: Reduce usage of MessageLoopProxy in base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 2 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 | « base/debug/trace_event_impl.cc ('k') | base/debug/trace_event_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_memory.h
diff --git a/base/debug/trace_event_memory.h b/base/debug/trace_event_memory.h
index 4caeef4de855a1ed383a297bd510b28d884aca51..3a84dff873c11e16392147af06fcb9fbf8a9e855 100644
--- a/base/debug/trace_event_memory.h
+++ b/base/debug/trace_event_memory.h
@@ -20,7 +20,7 @@
namespace base {
-class MessageLoopProxy;
+class SingleThreadTaskRunner;
namespace debug {
@@ -35,15 +35,14 @@ class BASE_EXPORT TraceMemoryController
typedef void (*HeapProfilerStopFunction)();
typedef char* (*GetHeapProfileFunction)();
- // |message_loop_proxy| must be a proxy to the primary thread for the client
- // process, e.g. the UI thread in a browser. The function pointers must be
- // pointers to tcmalloc heap profiling functions; by avoiding direct calls to
- // these functions we avoid a dependency on third_party/tcmalloc from base.
- TraceMemoryController(
- scoped_refptr<MessageLoopProxy> message_loop_proxy,
- HeapProfilerStartFunction heap_profiler_start_function,
- HeapProfilerStopFunction heap_profiler_stop_function,
- GetHeapProfileFunction get_heap_profile_function);
+ // |main_task_runner| must be the primary thread for the client process, e.g.
+ // the UI thread in a browser. The function pointers must be pointers to
+ // tcmalloc heap profiling functions; by avoiding direct calls to these
+ // functions we avoid a dependency on third_party/tcmalloc from base.
+ TraceMemoryController(scoped_refptr<SingleThreadTaskRunner> main_task_runner,
+ HeapProfilerStartFunction heap_profiler_start_function,
+ HeapProfilerStopFunction heap_profiler_stop_function,
+ GetHeapProfileFunction get_heap_profile_function);
virtual ~TraceMemoryController();
// base::debug::TraceLog::EnabledStateChangedObserver overrides:
@@ -65,7 +64,7 @@ class BASE_EXPORT TraceMemoryController
bool IsTimerRunningForTest() const;
// Ensures the observer starts and stops tracing on the primary thread.
- scoped_refptr<MessageLoopProxy> message_loop_proxy_;
+ scoped_refptr<SingleThreadTaskRunner> main_task_runner_;
// Pointers to tcmalloc heap profiling functions. Allows this class to use
// tcmalloc functions without introducing a dependency from base to tcmalloc.
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | base/debug/trace_event_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698