| 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 23 matching lines...) Expand all Loading... |
| 34 // base::trace_event::MemoryDumpManagerDelegate implementation. | 34 // base::trace_event::MemoryDumpManagerDelegate implementation. |
| 35 void RequestGlobalMemoryDump( | 35 void RequestGlobalMemoryDump( |
| 36 const base::trace_event::MemoryDumpRequestArgs& args, | 36 const base::trace_event::MemoryDumpRequestArgs& args, |
| 37 const base::trace_event::MemoryDumpCallback& callback) override; | 37 const base::trace_event::MemoryDumpCallback& callback) override; |
| 38 uint64 GetTracingProcessId() const override; | 38 uint64 GetTracingProcessId() const override; |
| 39 | 39 |
| 40 void SetChildTraceMessageFilter(ChildTraceMessageFilter* ctmf); | 40 void SetChildTraceMessageFilter(ChildTraceMessageFilter* ctmf); |
| 41 | 41 |
| 42 // Pass kInvalidTracingProcessId to invalidate the id. | 42 // Pass kInvalidTracingProcessId to invalidate the id. |
| 43 void set_tracing_process_id(uint64 id) { | 43 void set_tracing_process_id(uint64 id) { |
| 44 DCHECK_IMPLIES( | 44 DCHECK(tracing_process_id_ == |
| 45 tracing_process_id_ != | 45 base::trace_event::MemoryDumpManager::kInvalidTracingProcessId || |
| 46 base::trace_event::MemoryDumpManager::kInvalidTracingProcessId, | 46 id == |
| 47 id == base::trace_event::MemoryDumpManager::kInvalidTracingProcessId || | 47 base::trace_event::MemoryDumpManager::kInvalidTracingProcessId || |
| 48 id == tracing_process_id_); | 48 id == tracing_process_id_); |
| 49 tracing_process_id_ = id; | 49 tracing_process_id_ = id; |
| 50 } | 50 } |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 // Make CreateProcessDump() visible to ChildTraceMessageFilter. | 53 // Make CreateProcessDump() visible to ChildTraceMessageFilter. |
| 54 friend class ChildTraceMessageFilter; | 54 friend class ChildTraceMessageFilter; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 friend struct base::DefaultSingletonTraits< | 57 friend struct base::DefaultSingletonTraits< |
| 58 ChildMemoryDumpManagerDelegateImpl>; | 58 ChildMemoryDumpManagerDelegateImpl>; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 73 // The unique id of the child process, created for tracing and is expected to | 73 // The unique id of the child process, created for tracing and is expected to |
| 74 // be valid only when tracing is enabled. | 74 // be valid only when tracing is enabled. |
| 75 uint64 tracing_process_id_; | 75 uint64 tracing_process_id_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(ChildMemoryDumpManagerDelegateImpl); | 77 DISALLOW_COPY_AND_ASSIGN(ChildMemoryDumpManagerDelegateImpl); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace tracing | 80 } // namespace tracing |
| 81 | 81 |
| 82 #endif // COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_ | 82 #endif // COMPONENTS_TRACING_CHILD_MEMORY_DUMP_MANAGER_DELEGATE_IMPL_H_ |
| OLD | NEW |