OLD | NEW |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 id == base::trace_event::MemoryDumpManager::kInvalidTracingProcessId || | 46 id == base::trace_event::MemoryDumpManager::kInvalidTracingProcessId || |
47 id == tracing_process_id_); | 47 id == tracing_process_id_); |
48 tracing_process_id_ = id; | 48 tracing_process_id_ = id; |
49 } | 49 } |
50 | 50 |
51 protected: | 51 protected: |
52 // Make CreateProcessDump() visible to ChildTraceMessageFilter. | 52 // Make CreateProcessDump() visible to ChildTraceMessageFilter. |
53 friend class ChildTraceMessageFilter; | 53 friend class ChildTraceMessageFilter; |
54 | 54 |
55 private: | 55 private: |
56 friend struct DefaultSingletonTraits<ChildMemoryDumpManagerDelegateImpl>; | 56 friend struct base::DefaultSingletonTraits< |
| 57 ChildMemoryDumpManagerDelegateImpl>; |
57 | 58 |
58 ChildMemoryDumpManagerDelegateImpl(); | 59 ChildMemoryDumpManagerDelegateImpl(); |
59 ~ChildMemoryDumpManagerDelegateImpl() override; | 60 ~ChildMemoryDumpManagerDelegateImpl() override; |
60 | 61 |
61 ChildTraceMessageFilter* ctmf_; // Not owned. | 62 ChildTraceMessageFilter* ctmf_; // Not owned. |
62 | 63 |
63 // The SingleThreadTaskRunner where the |ctmf_| lives. | 64 // The SingleThreadTaskRunner where the |ctmf_| lives. |
64 // It is NULL iff |cmtf_| is NULL. | 65 // It is NULL iff |cmtf_| is NULL. |
65 scoped_refptr<base::SingleThreadTaskRunner> ctmf_task_runner_; | 66 scoped_refptr<base::SingleThreadTaskRunner> ctmf_task_runner_; |
66 | 67 |
67 // The unique id of the child process, created for tracing and is expected to | 68 // The unique id of the child process, created for tracing and is expected to |
68 // be valid only when tracing is enabled. | 69 // be valid only when tracing is enabled. |
69 uint64 tracing_process_id_; | 70 uint64 tracing_process_id_; |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(ChildMemoryDumpManagerDelegateImpl); | 72 DISALLOW_COPY_AND_ASSIGN(ChildMemoryDumpManagerDelegateImpl); |
72 }; | 73 }; |
73 | 74 |
74 } // namespace tracing | 75 } // namespace tracing |
75 | 76 |
76 #endif // COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_ | 77 #endif // COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_ |
OLD | NEW |