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

Side by Side Diff: content/public/common/prefetch_argument_win.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: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/common/prefetch_argument_win.h"
6
7 #include "base/command_line.h"
8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h"
10 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win. h"
11
12 namespace content {
13
14 void AddWindowsPrefetchArgument(int prefetch_id,
15 base::CommandLine* command_line) {
16 DCHECK(command_line);
17
18 // There can only be 9 different prefetch profiles per executable.
19 DCHECK_GE(prefetch_id, 0);
20 DCHECK_LE(prefetch_id, 8);
21
22 if (startup_metric_utils::GetPreReadOptions() &
23 startup_metric_utils::PRE_READ_OPTION_NO_PREFETCH_ARGUMENT) {
24 return;
25 }
26
27 if (prefetch_id != 0)
28 command_line->AppendArg(base::StringPrintf("/prefetch:%d", prefetch_id));
29 }
30
31 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698