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

Side by Side Diff: content/public/browser/browser_child_process_host.h

Issue 2224063002: Use persistent memory for receiving metrics from sub-processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 4 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_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
7 7
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/common/process_type.h" 14 #include "content/public/common/process_type.h"
15 #include "ipc/ipc_sender.h" 15 #include "ipc/ipc_sender.h"
16 16
17 #if defined(OS_MACOSX) 17 #if defined(OS_MACOSX)
18 #include "base/process/port_provider_mac.h" 18 #include "base/process/port_provider_mac.h"
19 #endif 19 #endif
20 20
21 namespace base { 21 namespace base {
22 class CommandLine; 22 class CommandLine;
23 class FilePath; 23 class FilePath;
24 class SharedPersistentMemoryAllocator;
24 } 25 }
25 26
26 namespace shell { 27 namespace shell {
27 class InterfaceProvider; 28 class InterfaceProvider;
28 } 29 }
29 30
30 namespace content { 31 namespace content {
31 32
32 class BrowserChildProcessHostDelegate; 33 class BrowserChildProcessHostDelegate;
33 class ChildProcessHost; 34 class ChildProcessHost;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Returns the termination status of a child. |exit_code| is the 76 // Returns the termination status of a child. |exit_code| is the
76 // status returned when the process exited (for posix, as returned 77 // status returned when the process exited (for posix, as returned
77 // from waitpid(), for Windows, as returned from 78 // from waitpid(), for Windows, as returned from
78 // GetExitCodeProcess()). |exit_code| may be nullptr. 79 // GetExitCodeProcess()). |exit_code| may be nullptr.
79 // |known_dead| indicates that the child is already dead. On Linux, this 80 // |known_dead| indicates that the child is already dead. On Linux, this
80 // information is necessary to retrieve accurate information. See 81 // information is necessary to retrieve accurate information. See
81 // ChildProcessLauncher::GetChildTerminationStatus() for more details. 82 // ChildProcessLauncher::GetChildTerminationStatus() for more details.
82 virtual base::TerminationStatus GetTerminationStatus( 83 virtual base::TerminationStatus GetTerminationStatus(
83 bool known_dead, int* exit_code) = 0; 84 bool known_dead, int* exit_code) = 0;
84 85
86 // Take ownership of a "shared" metrics allocator (if one exists).
87 virtual std::unique_ptr<base::SharedPersistentMemoryAllocator>
88 TakeMetricsAllocator() = 0;
89
85 // Sets the user-visible name of the process. 90 // Sets the user-visible name of the process.
86 virtual void SetName(const base::string16& name) = 0; 91 virtual void SetName(const base::string16& name) = 0;
87 92
88 // Set the handle of the process. BrowserChildProcessHost will do this when 93 // Set the handle of the process. BrowserChildProcessHost will do this when
89 // the Launch method is used to start the process. However if the owner 94 // the Launch method is used to start the process. However if the owner
90 // of this object doesn't call Launch and starts the process in another way, 95 // of this object doesn't call Launch and starts the process in another way,
91 // they need to call this method so that the process handle is associated with 96 // they need to call this method so that the process handle is associated with
92 // this object. 97 // this object.
93 virtual void SetHandle(base::ProcessHandle handle) = 0; 98 virtual void SetHandle(base::ProcessHandle handle) = 0;
94 99
95 #if defined(OS_MACOSX) 100 #if defined(OS_MACOSX)
96 // Returns a PortProvider used to get the task port for child processes. 101 // Returns a PortProvider used to get the task port for child processes.
97 static base::PortProvider* GetPortProvider(); 102 static base::PortProvider* GetPortProvider();
98 #endif 103 #endif
99 }; 104 };
100 105
101 }; // namespace content 106 }; // namespace content
102 107
103 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ 108 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698