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

Side by Side Diff: content/browser/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: self-review 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/plugin_process_host.h" 5 #include "content/browser/plugin_process_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 base::FilePath exe_path = ChildProcessHost::GetChildPath(flags); 202 base::FilePath exe_path = ChildProcessHost::GetChildPath(flags);
203 if (exe_path.empty()) 203 if (exe_path.empty())
204 return false; 204 return false;
205 205
206 base::CommandLine* cmd_line = new base::CommandLine(exe_path); 206 base::CommandLine* cmd_line = new base::CommandLine(exe_path);
207 // Put the process type and plugin path first so they're easier to see 207 // Put the process type and plugin path first so they're easier to see
208 // in process listings using native process management tools. 208 // in process listings using native process management tools.
209 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kPluginProcess); 209 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kPluginProcess);
210 cmd_line->AppendSwitchPath(switches::kPluginPath, info.path); 210 cmd_line->AppendSwitchPath(switches::kPluginPath, info.path);
211 211
212 #if defined(OS_WIN)
213 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument())
214 cmd_line->AppendArg(switches::kPrefetchArgumentOther);
215 #endif // defined(OS_WIN)
216
212 // Propagate the following switches to the plugin command line (along with 217 // Propagate the following switches to the plugin command line (along with
213 // any associated values) if present in the browser command line 218 // any associated values) if present in the browser command line
214 static const char* const kSwitchNames[] = { 219 static const char* const kSwitchNames[] = {
215 switches::kDisableBreakpad, 220 switches::kDisableBreakpad,
216 switches::kDisableDirectNPAPIRequests, 221 switches::kDisableDirectNPAPIRequests,
217 switches::kEnableStatsTable, 222 switches::kEnableStatsTable,
218 switches::kFullMemoryCrashReport, 223 switches::kFullMemoryCrashReport,
219 switches::kLoggingLevel, 224 switches::kLoggingLevel,
220 switches::kLogPluginMessages, 225 switches::kLogPluginMessages,
221 switches::kNoSandbox, 226 switches::kNoSandbox,
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 void PluginProcessHost::GetContexts(ResourceType resource_type, 433 void PluginProcessHost::GetContexts(ResourceType resource_type,
429 int origin_pid, 434 int origin_pid,
430 ResourceContext** resource_context, 435 ResourceContext** resource_context,
431 net::URLRequestContext** request_context) { 436 net::URLRequestContext** request_context) {
432 *resource_context = 437 *resource_context =
433 resource_context_map_[origin_pid].resource_context; 438 resource_context_map_[origin_pid].resource_context;
434 *request_context = (*resource_context)->GetRequestContext(); 439 *request_context = (*resource_context)->GetRequestContext();
435 } 440 }
436 441
437 } // namespace content 442 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698