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

Side by Side Diff: content/browser/utility_process_host_impl.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/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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 #endif 307 #endif
308 308
309 cmd_line->AppendSwitchASCII(switches::kProcessType, 309 cmd_line->AppendSwitchASCII(switches::kProcessType,
310 switches::kUtilityProcess); 310 switches::kUtilityProcess);
311 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, 311 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken,
312 mojo_channel_token); 312 mojo_channel_token);
313 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); 313 std::string locale = GetContentClient()->browser()->GetApplicationLocale();
314 cmd_line->AppendSwitchASCII(switches::kLang, locale); 314 cmd_line->AppendSwitchASCII(switches::kLang, locale);
315 315
316 #if defined(OS_WIN) 316 #if defined(OS_WIN)
317 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) 317 cmd_line->AppendArg(switches::kPrefetchArgumentOther);
318 cmd_line->AppendArg(switches::kPrefetchArgumentOther);
319 #endif // defined(OS_WIN) 318 #endif // defined(OS_WIN)
320 319
321 if (no_sandbox_) 320 if (no_sandbox_)
322 cmd_line->AppendSwitch(switches::kNoSandbox); 321 cmd_line->AppendSwitch(switches::kNoSandbox);
323 322
324 // Browser command-line switches to propagate to the utility process. 323 // Browser command-line switches to propagate to the utility process.
325 static const char* const kSwitchNames[] = { 324 static const char* const kSwitchNames[] = {
326 switches::kNoSandbox, 325 switches::kNoSandbox,
327 switches::kProfilerTiming, 326 switches::kProfilerTiming,
328 #if defined(OS_MACOSX) 327 #if defined(OS_MACOSX)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 base::WeakPtr<UtilityProcessHostImpl> host, 412 base::WeakPtr<UtilityProcessHostImpl> host,
414 int error_code) { 413 int error_code) {
415 if (!host) 414 if (!host)
416 return; 415 return;
417 416
418 host->OnProcessLaunchFailed(error_code); 417 host->OnProcessLaunchFailed(error_code);
419 delete host.get(); 418 delete host.get();
420 } 419 }
421 420
422 } // namespace content 421 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698