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

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

Issue 1612663002: Use a valid /prefetch argument when launching a process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bit
Patch Set: rebase + prefetch argument for crashpad 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 VLOG(1) << "Pepper plugin exe path is empty."; 387 VLOG(1) << "Pepper plugin exe path is empty.";
388 return false; 388 return false;
389 } 389 }
390 390
391 base::CommandLine* cmd_line = new base::CommandLine(exe_path); 391 base::CommandLine* cmd_line = new base::CommandLine(exe_path);
392 cmd_line->AppendSwitchASCII(switches::kProcessType, 392 cmd_line->AppendSwitchASCII(switches::kProcessType,
393 is_broker_ ? switches::kPpapiBrokerProcess 393 is_broker_ ? switches::kPpapiBrokerProcess
394 : switches::kPpapiPluginProcess); 394 : switches::kPpapiPluginProcess);
395 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 395 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
396 396
397 #if defined(OS_WIN)
398 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) {
399 cmd_line->AppendArg(is_broker_ ? switches::kPrefetchArgumentPpapiBroker
400 : switches::kPrefetchArgumentPpapi);
401 }
402 #endif // defined(OS_WIN)
403
397 // These switches are forwarded to both plugin and broker pocesses. 404 // These switches are forwarded to both plugin and broker pocesses.
398 static const char* kCommonForwardSwitches[] = { 405 static const char* kCommonForwardSwitches[] = {
399 switches::kVModule 406 switches::kVModule
400 }; 407 };
401 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, 408 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches,
402 arraysize(kCommonForwardSwitches)); 409 arraysize(kCommonForwardSwitches));
403 410
404 if (!is_broker_) { 411 if (!is_broker_) {
405 static const char* kPluginForwardSwitches[] = { 412 static const char* kPluginForwardSwitches[] = {
406 switches::kDisableSeccompFilterSandbox, 413 switches::kDisableSeccompFilterSandbox,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // sent_requests_ queue should be the one that the plugin just created. 546 // sent_requests_ queue should be the one that the plugin just created.
540 Client* client = sent_requests_.front(); 547 Client* client = sent_requests_.front();
541 sent_requests_.pop(); 548 sent_requests_.pop();
542 549
543 const ChildProcessData& data = process_->GetData(); 550 const ChildProcessData& data = process_->GetData();
544 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 551 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
545 data.id); 552 data.id);
546 } 553 }
547 554
548 } // namespace content 555 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.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