Index: content/browser/browser_child_process_host_impl.h |
diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h |
index 2d0792ef4bc04809305240c2e16fe7519622a22f..43cd8bebc276fc86113f28bc3df96f6bb4824306 100644 |
--- a/content/browser/browser_child_process_host_impl.h |
+++ b/content/browser/browser_child_process_host_impl.h |
@@ -76,6 +76,8 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl |
ChildProcessHost* GetHost() const override; |
base::TerminationStatus GetTerminationStatus(bool known_dead, |
int* exit_code) override; |
+ std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() |
+ override; |
void SetName(const base::string16& name) override; |
void SetHandle(base::ProcessHandle handle) override; |
@@ -120,6 +122,14 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl |
static void AddObserver(BrowserChildProcessObserver* observer); |
static void RemoveObserver(BrowserChildProcessObserver* observer); |
+ // Creates the |metrics_allocator_|. |
+ void CreateMetricsAllocator(); |
+ |
+ // Passes the |metrics_allocator_|, if any, to the managed process. This |
+ // requires the process to have been launched and the IPC channel to be |
+ // available. |
+ void ShareMetricsAllocatorToProcess(); |
+ |
// ChildProcessLauncher::Client implementation. |
void OnProcessLaunched() override; |
void OnProcessLaunchFailed(int error_code) override; |
@@ -156,6 +166,9 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl |
base::win::ObjectWatcher early_exit_watcher_; |
#endif |
+ // The memory allocator, if any, in which the process will write its metrics. |
+ std::unique_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_; |
+ |
bool is_channel_connected_; |
bool notify_child_disconnected_; |