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

Side by Side Diff: content/common/child_process_host_impl.h

Issue 2694083005: memory-infra: Finish moving memory_infra from TracingController (Closed)
Patch Set: review Created 3 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // 46 //
47 // This will never return ChildProcessHost::kInvalidUniqueID. 47 // This will never return ChildProcessHost::kInvalidUniqueID.
48 static int GenerateChildProcessUniqueId(); 48 static int GenerateChildProcessUniqueId();
49 49
50 // Derives a tracing process id from a child process id. Child process ids 50 // Derives a tracing process id from a child process id. Child process ids
51 // cannot be used directly in child process for tracing due to security 51 // cannot be used directly in child process for tracing due to security
52 // reasons (see: discussion in crrev.com/1173263004). This method is meant to 52 // reasons (see: discussion in crrev.com/1173263004). This method is meant to
53 // be used when tracing for identifying cross-process shared memory from a 53 // be used when tracing for identifying cross-process shared memory from a
54 // process which knows the child process id of its endpoints. The value 54 // process which knows the child process id of its endpoints. The value
55 // returned by this method is guaranteed to be equal to the value returned by 55 // returned by this method is guaranteed to be equal to the value returned by
56 // MemoryDumpManager::GetTracingProcessId() in the corresponding child 56 // MemoryDumpManager::tracing_process_id() in the corresponding child process.
57 // process.
58 // 57 //
59 // Never returns MemoryDumpManager::kInvalidTracingProcessId. 58 // Never returns MemoryDumpManager::kInvalidTracingProcessId.
60 // Returns only ChildProcessHost::kBrowserTracingProcessId in single-process 59 // Returns only ChildProcessHost::kBrowserTracingProcessId in single-process
61 // mode. 60 // mode.
62 static uint64_t ChildProcessUniqueIdToTracingProcessId(int child_process_id); 61 static uint64_t ChildProcessUniqueIdToTracingProcessId(int child_process_id);
63 62
64 // ChildProcessHost implementation 63 // ChildProcessHost implementation
65 bool Send(IPC::Message* message) override; 64 bool Send(IPC::Message* message) override;
66 void ForceShutdown() override; 65 void ForceShutdown() override;
67 std::string CreateChannelMojo( 66 std::string CreateChannelMojo(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // thread, we don't have a IPC::ChannelProxy and so we manage filters 98 // thread, we don't have a IPC::ChannelProxy and so we manage filters
100 // manually. 99 // manually.
101 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; 100 std::vector<scoped_refptr<IPC::MessageFilter> > filters_;
102 101
103 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); 102 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl);
104 }; 103 };
105 104
106 } // namespace content 105 } // namespace content
107 106
108 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ 107 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698