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

Side by Side Diff: content/browser/ppapi_plugin_process_host.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/ppapi_plugin_process_host.h" 5 #include "content/browser/ppapi_plugin_process_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 #elif defined(OS_POSIX) 110 #elif defined(OS_POSIX)
111 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) 111 #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
112 ZygoteHandle* GetZygote() override { 112 ZygoteHandle* GetZygote() override {
113 const base::CommandLine& browser_command_line = 113 const base::CommandLine& browser_command_line =
114 *base::CommandLine::ForCurrentProcess(); 114 *base::CommandLine::ForCurrentProcess();
115 base::CommandLine::StringType plugin_launcher = browser_command_line 115 base::CommandLine::StringType plugin_launcher = browser_command_line
116 .GetSwitchValueNative(switches::kPpapiPluginLauncher); 116 .GetSwitchValueNative(switches::kPpapiPluginLauncher);
117 if (is_broker_ || !plugin_launcher.empty()) 117 if (is_broker_ || !plugin_launcher.empty())
118 return nullptr; 118 return nullptr;
119 return &g_ppapi_zygote; 119 return GetGenericZygote();
120 } 120 }
121 #endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) 121 #endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
122 122
123 base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); } 123 base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }
124 #endif // OS_WIN 124 #endif // OS_WIN
125 125
126 SandboxType GetSandboxType() override { 126 SandboxType GetSandboxType() override {
127 return SANDBOX_TYPE_PPAPI; 127 return SANDBOX_TYPE_PPAPI;
128 } 128 }
129 129
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 // sent_requests_ queue should be the one that the plugin just created. 534 // sent_requests_ queue should be the one that the plugin just created.
535 Client* client = sent_requests_.front(); 535 Client* client = sent_requests_.front();
536 sent_requests_.pop(); 536 sent_requests_.pop();
537 537
538 const ChildProcessData& data = process_->GetData(); 538 const ChildProcessData& data = process_->GetData();
539 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 539 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
540 data.id); 540 data.id);
541 } 541 }
542 542
543 } // namespace content 543 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698