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 #include "content/browser/utility_process_host_impl.h" | 5 #include "content/browser/utility_process_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 exposed_files.value().c_str()); | 97 exposed_files.value().c_str()); |
98 return result == sandbox::SBOX_ALL_OK; | 98 return result == sandbox::SBOX_ALL_OK; |
99 } | 99 } |
100 | 100 |
101 #elif defined(OS_POSIX) | 101 #elif defined(OS_POSIX) |
102 | 102 |
103 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) | 103 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
104 ZygoteHandle* GetZygote() override { | 104 ZygoteHandle* GetZygote() override { |
105 if (no_sandbox_ || !exposed_dir_.empty()) | 105 if (no_sandbox_ || !exposed_dir_.empty()) |
106 return nullptr; | 106 return nullptr; |
107 return &g_utility_zygote; | 107 return GetGenericZygote(); |
108 } | 108 } |
109 #endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) | 109 #endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) |
110 base::EnvironmentMap GetEnvironment() override { return env_; } | 110 base::EnvironmentMap GetEnvironment() override { return env_; } |
111 base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); } | 111 base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); } |
112 #endif // OS_WIN | 112 #endif // OS_WIN |
113 | 113 |
114 SandboxType GetSandboxType() override { | 114 SandboxType GetSandboxType() override { |
115 return SANDBOX_TYPE_UTILITY; | 115 return SANDBOX_TYPE_UTILITY; |
116 } | 116 } |
117 | 117 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 if (RenderProcessHost::run_renderer_in_process()) | 397 if (RenderProcessHost::run_renderer_in_process()) |
398 handle = base::GetCurrentProcessHandle(); | 398 handle = base::GetCurrentProcessHandle(); |
399 else | 399 else |
400 handle = process_->GetData().handle; | 400 handle = process_->GetData().handle; |
401 | 401 |
402 mojo_application_host_->Activate(this, handle); | 402 mojo_application_host_->Activate(this, handle); |
403 } | 403 } |
404 } | 404 } |
405 | 405 |
406 } // namespace content | 406 } // namespace content |
OLD | NEW |