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

Side by Side Diff: components/tracing/child_memory_dump_manager_delegate_impl.h

Issue 1333873002: [tracing] Fix MemoryDumpManager to support startup tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re dsinclair #5 (nits, invert Initialize args) Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_ 5 #ifndef COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_
6 #define COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_ 6 #define COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_
7 7
8 #include "base/trace_event/memory_dump_manager.h" 8 #include "base/trace_event/memory_dump_manager.h"
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 15 matching lines...) Expand all
26 // gracefully (and thread-safely) failures in the case of a lack of the CTMF. 26 // gracefully (and thread-safely) failures in the case of a lack of the CTMF.
27 class ChildMemoryDumpManagerDelegateImpl 27 class ChildMemoryDumpManagerDelegateImpl
28 : public base::trace_event::MemoryDumpManagerDelegate { 28 : public base::trace_event::MemoryDumpManagerDelegate {
29 public: 29 public:
30 static ChildMemoryDumpManagerDelegateImpl* GetInstance(); 30 static ChildMemoryDumpManagerDelegateImpl* GetInstance();
31 31
32 // base::trace_event::MemoryDumpManagerDelegate implementation. 32 // base::trace_event::MemoryDumpManagerDelegate implementation.
33 void RequestGlobalMemoryDump( 33 void RequestGlobalMemoryDump(
34 const base::trace_event::MemoryDumpRequestArgs& args, 34 const base::trace_event::MemoryDumpRequestArgs& args,
35 const base::trace_event::MemoryDumpCallback& callback) override; 35 const base::trace_event::MemoryDumpCallback& callback) override;
36 bool IsCoordinatorProcess() const override;
37 uint64 GetTracingProcessId() const override; 36 uint64 GetTracingProcessId() const override;
38 37
39 void SetChildTraceMessageFilter(ChildTraceMessageFilter* ctmf); 38 void SetChildTraceMessageFilter(ChildTraceMessageFilter* ctmf);
40 39
41 // Pass kInvalidTracingProcessId to invalidate the id. 40 // Pass kInvalidTracingProcessId to invalidate the id.
42 void set_tracing_process_id(uint64 id) { 41 void set_tracing_process_id(uint64 id) {
43 DCHECK_IMPLIES( 42 DCHECK_IMPLIES(
44 tracing_process_id_ != 43 tracing_process_id_ !=
45 base::trace_event::MemoryDumpManager::kInvalidTracingProcessId, 44 base::trace_event::MemoryDumpManager::kInvalidTracingProcessId,
46 id == base::trace_event::MemoryDumpManager::kInvalidTracingProcessId || 45 id == base::trace_event::MemoryDumpManager::kInvalidTracingProcessId ||
(...skipping 20 matching lines...) Expand all
67 // The unique id of the child process, created for tracing and is expected to 66 // The unique id of the child process, created for tracing and is expected to
68 // be valid only when tracing is enabled. 67 // be valid only when tracing is enabled.
69 uint64 tracing_process_id_; 68 uint64 tracing_process_id_;
70 69
71 DISALLOW_COPY_AND_ASSIGN(ChildMemoryDumpManagerDelegateImpl); 70 DISALLOW_COPY_AND_ASSIGN(ChildMemoryDumpManagerDelegateImpl);
72 }; 71 };
73 72
74 } // namespace tracing 73 } // namespace tracing
75 74
76 #endif // COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_ 75 #endif // COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | components/tracing/child_memory_dump_manager_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698