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

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

Issue 2075693002: Always use a /prefetch:# switch when launching a process on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return false; 399 return false;
400 } 400 }
401 401
402 base::CommandLine* cmd_line = new base::CommandLine(exe_path); 402 base::CommandLine* cmd_line = new base::CommandLine(exe_path);
403 cmd_line->AppendSwitchASCII(switches::kProcessType, 403 cmd_line->AppendSwitchASCII(switches::kProcessType,
404 is_broker_ ? switches::kPpapiBrokerProcess 404 is_broker_ ? switches::kPpapiBrokerProcess
405 : switches::kPpapiPluginProcess); 405 : switches::kPpapiPluginProcess);
406 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token); 406 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token);
407 407
408 #if defined(OS_WIN) 408 #if defined(OS_WIN)
409 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) { 409 cmd_line->AppendArg(is_broker_ ? switches::kPrefetchArgumentPpapiBroker
410 cmd_line->AppendArg(is_broker_ ? switches::kPrefetchArgumentPpapiBroker 410 : switches::kPrefetchArgumentPpapi);
411 : switches::kPrefetchArgumentPpapi);
412 }
413 #endif // defined(OS_WIN) 411 #endif // defined(OS_WIN)
414 412
415 // These switches are forwarded to both plugin and broker pocesses. 413 // These switches are forwarded to both plugin and broker pocesses.
416 static const char* const kCommonForwardSwitches[] = { 414 static const char* const kCommonForwardSwitches[] = {
417 switches::kVModule 415 switches::kVModule
418 }; 416 };
419 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, 417 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches,
420 arraysize(kCommonForwardSwitches)); 418 arraysize(kCommonForwardSwitches));
421 419
422 if (!is_broker_) { 420 if (!is_broker_) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 // sent_requests_ queue should be the one that the plugin just created. 556 // sent_requests_ queue should be the one that the plugin just created.
559 Client* client = sent_requests_.front(); 557 Client* client = sent_requests_.front();
560 sent_requests_.pop(); 558 sent_requests_.pop();
561 559
562 const ChildProcessData& data = process_->GetData(); 560 const ChildProcessData& data = process_->GetData();
563 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 561 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
564 data.id); 562 data.id);
565 } 563 }
566 564
567 } // namespace content 565 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_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