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

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

Issue 2365273004: Initial implementation for sharing field trial state (win) (Closed)
Patch Set: rebase + gclient sync Created 4 years, 2 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
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('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/process/kill.h" 10 #include "base/process/kill.h"
10 #include "base/process/process_handle.h" 11 #include "base/process/process_handle.h"
11 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
14 #include "content/public/common/process_type.h" 15 #include "content/public/common/process_type.h"
15 #include "ipc/ipc_sender.h" 16 #include "ipc/ipc_sender.h"
16 17
17 #if defined(OS_MACOSX) 18 #if defined(OS_MACOSX)
18 #include "base/process/port_provider_mac.h" 19 #include "base/process/port_provider_mac.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const std::string& service_name); 56 const std::string& service_name);
56 57
57 // 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
58 // 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
59 // is the same unique ID as |ChildProcessData::id|. 60 // is the same unique ID as |ChildProcessData::id|.
60 static BrowserChildProcessHost* FromID(int child_process_id); 61 static BrowserChildProcessHost* FromID(int child_process_id);
61 62
62 ~BrowserChildProcessHost() override {} 63 ~BrowserChildProcessHost() override {}
63 64
64 // Derived classes call this to launch the child process asynchronously. 65 // Derived classes call this to launch the child process asynchronously.
65 // Takes ownership of |cmd_line| and |delegate|. 66 // Takes ownership of |cmd_line| and |delegate|. Takes in |field_trial_state|
66 virtual void Launch( 67 // to explicitly pass its handle to be inherited on Windows to the child
67 SandboxedProcessLauncherDelegate* delegate, 68 // process via the command line.
68 base::CommandLine* cmd_line, 69 virtual void Launch(SandboxedProcessLauncherDelegate* delegate,
69 bool terminate_on_shutdown) = 0; 70 base::CommandLine* cmd_line,
71 const base::SharedMemory* field_trial_state,
72 bool terminate_on_shutdown) = 0;
70 73
71 virtual const ChildProcessData& GetData() const = 0; 74 virtual const ChildProcessData& GetData() const = 0;
72 75
73 // Returns the ChildProcessHost object used by this object. 76 // Returns the ChildProcessHost object used by this object.
74 virtual ChildProcessHost* GetHost() const = 0; 77 virtual ChildProcessHost* GetHost() const = 0;
75 78
76 // Returns the termination status of a child. |exit_code| is the 79 // Returns the termination status of a child. |exit_code| is the
77 // status returned when the process exited (for posix, as returned 80 // status returned when the process exited (for posix, as returned
78 // from waitpid(), for Windows, as returned from 81 // from waitpid(), for Windows, as returned from
79 // GetExitCodeProcess()). |exit_code| may be nullptr. 82 // GetExitCodeProcess()). |exit_code| may be nullptr.
(...skipping 19 matching lines...) Expand all
99 102
100 #if defined(OS_MACOSX) 103 #if defined(OS_MACOSX)
101 // Returns a PortProvider used to get the task port for child processes. 104 // Returns a PortProvider used to get the task port for child processes.
102 static base::PortProvider* GetPortProvider(); 105 static base::PortProvider* GetPortProvider();
103 #endif 106 #endif
104 }; 107 };
105 108
106 }; // namespace content 109 }; // namespace content
107 110
108 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ 111 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698