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

Side by Side Diff: content/browser/utility_process_host_impl.cc

Issue 1643533006: Use a single, generic, global zygote to temporarily resolve perf regressions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused ppapi header Created 4 years, 10 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
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 #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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/zygote_host/zygote_handle_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698