| 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_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/process/launch.h" | 9 #include "base/process/launch.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // Allows a directory to be opened through the sandbox, in case it's needed by | 54 // Allows a directory to be opened through the sandbox, in case it's needed by |
| 55 // the operation. | 55 // the operation. |
| 56 virtual void SetExposedDir(const base::FilePath& dir) = 0; | 56 virtual void SetExposedDir(const base::FilePath& dir) = 0; |
| 57 | 57 |
| 58 // Allows a mdns to use network in sandbox. | 58 // Allows a mdns to use network in sandbox. |
| 59 virtual void EnableMDns() = 0; | 59 virtual void EnableMDns() = 0; |
| 60 | 60 |
| 61 // Make the process run without a sandbox. | 61 // Make the process run without a sandbox. |
| 62 virtual void DisableSandbox() = 0; | 62 virtual void DisableSandbox() = 0; |
| 63 | 63 |
| 64 #if defined(OS_WIN) |
| 65 // Make the process run elevated. |
| 66 virtual void ElevatePrivileges() = 0; |
| 67 #endif |
| 68 |
| 64 // If the sandbox is being used and we are on Linux, launch the process from | 69 // If the sandbox is being used and we are on Linux, launch the process from |
| 65 // the zygote. Can only be used for tasks that do not require FS access. | 70 // the zygote. Can only be used for tasks that do not require FS access. |
| 66 virtual void EnableZygote() = 0; | 71 virtual void EnableZygote() = 0; |
| 67 | 72 |
| 68 // Returns information about the utility child process. | 73 // Returns information about the utility child process. |
| 69 virtual const ChildProcessData& GetData() = 0; | 74 virtual const ChildProcessData& GetData() = 0; |
| 70 | 75 |
| 71 #if defined(OS_POSIX) | 76 #if defined(OS_POSIX) |
| 72 virtual void SetEnv(const base::EnvironmentMap& env) = 0; | 77 virtual void SetEnv(const base::EnvironmentMap& env) = 0; |
| 73 #endif | 78 #endif |
| 74 | 79 |
| 75 CONTENT_EXPORT static void RegisterUtilityMainThreadFactory( | 80 CONTENT_EXPORT static void RegisterUtilityMainThreadFactory( |
| 76 UtilityMainThreadFactoryFunction create); | 81 UtilityMainThreadFactoryFunction create); |
| 77 }; | 82 }; |
| 78 | 83 |
| 79 }; // namespace content | 84 }; // namespace content |
| 80 | 85 |
| 81 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 86 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
| OLD | NEW |