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

Unified Diff: chrome/service/service_utility_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, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/service/service_utility_process_host.cc
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index 46483ff37a428bb10d3e664e2a39f72bfd97b7fb..bb5891bae4379a2f1493e6ddb723e4568c6d9da1 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -34,6 +34,10 @@
#include "sandbox/win/src/sandbox_types.h"
#include "ui/base/ui_base_switches.h"
+#if defined(OS_WIN)
+#include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.h"
+#endif // defined(OS_WIN)
+
namespace {
using content::ChildProcessHost;
@@ -224,6 +228,11 @@ bool ServiceUtilityProcessHost::StartProcess(bool no_sandbox) {
cmd_line.AppendSwitchASCII(switches::kProcessChannelID, channel_id);
cmd_line.AppendSwitch(switches::kLang);
+#if defined(OS_WIN)
+ if (startup_metric_utils::GetPreReadOptions().prefetch_argument)
+ cmd_line.AppendArg(switches::kPrefetchArgumentOther);
+#endif // defined(OS_WIN)
+
if (Launch(&cmd_line, no_sandbox)) {
ReportUmaEvent(SERVICE_UTILITY_STARTED);
return true;

Powered by Google App Engine
This is Rietveld 408576698