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 // Make the process run elevated. |
| 65 virtual void ElevatePrivileges() = 0; |
| 66 |
64 // If the sandbox is being used and we are on Linux, launch the process from | 67 // 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. | 68 // the zygote. Can only be used for tasks that do not require FS access. |
66 virtual void EnableZygote() = 0; | 69 virtual void EnableZygote() = 0; |
67 | 70 |
68 // Returns information about the utility child process. | 71 // Returns information about the utility child process. |
69 virtual const ChildProcessData& GetData() = 0; | 72 virtual const ChildProcessData& GetData() = 0; |
70 | 73 |
71 #if defined(OS_POSIX) | 74 #if defined(OS_POSIX) |
72 virtual void SetEnv(const base::EnvironmentMap& env) = 0; | 75 virtual void SetEnv(const base::EnvironmentMap& env) = 0; |
73 #endif | 76 #endif |
74 | 77 |
75 CONTENT_EXPORT static void RegisterUtilityMainThreadFactory( | 78 CONTENT_EXPORT static void RegisterUtilityMainThreadFactory( |
76 UtilityMainThreadFactoryFunction create); | 79 UtilityMainThreadFactoryFunction create); |
77 }; | 80 }; |
78 | 81 |
79 }; // namespace content | 82 }; // namespace content |
80 | 83 |
81 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 84 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
OLD | NEW |