Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 base::SequencedTaskRunner* client_task_runner); | 33 base::SequencedTaskRunner* client_task_runner); |
| 34 virtual ~UtilityProcessHostImpl(); | 34 virtual ~UtilityProcessHostImpl(); |
| 35 | 35 |
| 36 // UtilityProcessHost implementation: | 36 // UtilityProcessHost implementation: |
| 37 virtual bool Send(IPC::Message* message) OVERRIDE; | 37 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 38 virtual bool StartBatchMode() OVERRIDE; | 38 virtual bool StartBatchMode() OVERRIDE; |
| 39 virtual void EndBatchMode() OVERRIDE; | 39 virtual void EndBatchMode() OVERRIDE; |
| 40 virtual void SetExposedDir(const base::FilePath& dir) OVERRIDE; | 40 virtual void SetExposedDir(const base::FilePath& dir) OVERRIDE; |
| 41 virtual void EnableMDns() OVERRIDE; | 41 virtual void EnableMDns() OVERRIDE; |
| 42 virtual void DisableSandbox() OVERRIDE; | 42 virtual void DisableSandbox() OVERRIDE; |
| 43 virtual void ElevatePrivileges() OVERRIDE; | |
| 43 virtual void EnableZygote() OVERRIDE; | 44 virtual void EnableZygote() OVERRIDE; |
| 44 virtual const ChildProcessData& GetData() OVERRIDE; | 45 virtual const ChildProcessData& GetData() OVERRIDE; |
| 45 #if defined(OS_POSIX) | 46 #if defined(OS_POSIX) |
| 46 virtual void SetEnv(const base::EnvironmentMap& env) OVERRIDE; | 47 virtual void SetEnv(const base::EnvironmentMap& env) OVERRIDE; |
| 47 #endif | 48 #endif |
| 48 | 49 |
| 49 void set_child_flags(int flags) { child_flags_ = flags; } | 50 void set_child_flags(int flags) { child_flags_ = flags; } |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 // Starts a process if necessary. Returns true if it succeeded or a process | 53 // Starts a process if necessary. Returns true if it succeeded or a process |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 65 bool is_batch_mode_; | 66 bool is_batch_mode_; |
| 66 | 67 |
| 67 base::FilePath exposed_dir_; | 68 base::FilePath exposed_dir_; |
| 68 | 69 |
| 69 // Whether utility process needs perform presandbox initialization for MDns. | 70 // Whether utility process needs perform presandbox initialization for MDns. |
| 70 bool is_mdns_enabled_; | 71 bool is_mdns_enabled_; |
| 71 | 72 |
| 72 // Whether to pass switches::kNoSandbox to the child. | 73 // Whether to pass switches::kNoSandbox to the child. |
| 73 bool no_sandbox_; | 74 bool no_sandbox_; |
| 74 | 75 |
| 76 // Whether to pass switches::kNoSandbox to the child. | |
|
mef
2013/12/10 15:25:18
wrong comment.
| |
| 77 bool run_elevated_; | |
| 78 | |
| 75 // Flags defined in ChildProcessHost with which to start the process. | 79 // Flags defined in ChildProcessHost with which to start the process. |
| 76 int child_flags_; | 80 int child_flags_; |
| 77 | 81 |
| 78 // Launch the utility process from the zygote. Defaults to false. | 82 // Launch the utility process from the zygote. Defaults to false. |
| 79 bool use_linux_zygote_; | 83 bool use_linux_zygote_; |
| 80 | 84 |
| 81 base::EnvironmentMap env_; | 85 base::EnvironmentMap env_; |
| 82 | 86 |
| 83 bool started_; | 87 bool started_; |
| 84 | 88 |
| 85 scoped_ptr<BrowserChildProcessHostImpl> process_; | 89 scoped_ptr<BrowserChildProcessHostImpl> process_; |
| 86 | 90 |
| 87 // Used in single-process mode instead of process_. | 91 // Used in single-process mode instead of process_. |
| 88 scoped_ptr<base::Thread> in_process_thread_; | 92 scoped_ptr<base::Thread> in_process_thread_; |
| 89 | 93 |
| 90 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 94 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); |
| 91 }; | 95 }; |
| 92 | 96 |
| 93 } // namespace content | 97 } // namespace content |
| 94 | 98 |
| 95 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 99 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |