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

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

Issue 2412113002: Use SharedPersistentMemoryAllocator to share field trial state (Closed)
Patch Set: gclient sync Created 4 years, 1 month 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
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/process/kill.h" 10 #include "base/process/kill.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const std::string& service_name); 56 const std::string& service_name);
57 57
58 // Returns the child process host with unique id |child_process_id|, or 58 // Returns the child process host with unique id |child_process_id|, or
59 // nullptr if it doesn't exist. |child_process_id| is NOT the process ID, but 59 // nullptr if it doesn't exist. |child_process_id| is NOT the process ID, but
60 // is the same unique ID as |ChildProcessData::id|. 60 // is the same unique ID as |ChildProcessData::id|.
61 static BrowserChildProcessHost* FromID(int child_process_id); 61 static BrowserChildProcessHost* FromID(int child_process_id);
62 62
63 ~BrowserChildProcessHost() override {} 63 ~BrowserChildProcessHost() override {}
64 64
65 // Derived classes call this to launch the child process asynchronously. 65 // Derived classes call this to launch the child process asynchronously.
66 // Takes ownership of |cmd_line| and |delegate|. Takes in |field_trial_state| 66 // Takes ownership of |cmd_line| and |delegate|.
67 // to explicitly pass its handle to be inherited on Windows to the child
68 // process via the command line.
69 virtual void Launch(SandboxedProcessLauncherDelegate* delegate, 67 virtual void Launch(SandboxedProcessLauncherDelegate* delegate,
70 base::CommandLine* cmd_line, 68 base::CommandLine* cmd_line,
71 const base::SharedMemory* field_trial_state,
72 bool terminate_on_shutdown) = 0; 69 bool terminate_on_shutdown) = 0;
73 70
74 virtual const ChildProcessData& GetData() const = 0; 71 virtual const ChildProcessData& GetData() const = 0;
75 72
76 // Returns the ChildProcessHost object used by this object. 73 // Returns the ChildProcessHost object used by this object.
77 virtual ChildProcessHost* GetHost() const = 0; 74 virtual ChildProcessHost* GetHost() const = 0;
78 75
79 // Returns the termination status of a child. |exit_code| is the 76 // Returns the termination status of a child. |exit_code| is the
80 // status returned when the process exited (for posix, as returned 77 // status returned when the process exited (for posix, as returned
81 // from waitpid(), for Windows, as returned from 78 // from waitpid(), for Windows, as returned from
(...skipping 20 matching lines...) Expand all
102 99
103 #if defined(OS_MACOSX) 100 #if defined(OS_MACOSX)
104 // 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.
105 static base::PortProvider* GetPortProvider(); 102 static base::PortProvider* GetPortProvider();
106 #endif 103 #endif
107 }; 104 };
108 105
109 }; // namespace content 106 }; // namespace content
110 107
111 #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/utility_process_host_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698