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

Unified Diff: components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc

Issue 1595633002: Use valid /prefetch arguments for process launches on Windows. - do not submit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move
Patch Set: format 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: components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc
diff --git a/components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc b/components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc
index 6aa82a19d93e59d8da9f80ca767206fe5f438be6..522481030252f736b939a9f055a47e126e312488 100644
--- a/components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc
+++ b/components/startup_metric_utils/common/pre_read_field_trial_utils_win.cc
@@ -31,6 +31,7 @@ const base::char16 kHighPriorityVariationName[] = L"HighPriority";
const base::char16 kOnlyIfColdVariationName[] = L"OnlyIfCold";
const base::char16 kPrefetchVirtualMemoryVariationName[] =
L"PrefetchVirtualMemory";
+const base::char16 kPrefetchArgumentVariationName[] = L"PrefetchArgument";
// Registry key in which the PreRead field trial group is stored.
const base::char16 kPreReadFieldTrialRegistryKey[] = L"\\PreReadFieldTrial";
@@ -47,12 +48,14 @@ void GetPreReadOptions(const base::string16& product_registry_path,
bool* no_pre_read,
bool* high_priority,
bool* only_if_cold,
- bool* prefetch_virtual_memory) {
+ bool* prefetch_virtual_memory,
+ bool* prefetch_argument) {
DCHECK(!product_registry_path.empty());
DCHECK(no_pre_read);
DCHECK(high_priority);
DCHECK(only_if_cold);
DCHECK(prefetch_virtual_memory);
+ DCHECK(prefetch_argument);
// Open the PreRead field trial's registry key.
const base::string16 registry_path =
@@ -69,6 +72,7 @@ void GetPreReadOptions(const base::string16& product_registry_path,
{kHighPriorityVariationName, high_priority},
{kOnlyIfColdVariationName, only_if_cold},
{kPrefetchVirtualMemoryVariationName, prefetch_virtual_memory},
+ {kPrefetchArgumentVariationName, prefetch_argument},
gab 2016/01/18 19:10:52 Actually, /prefetch applies only to processes laun
};
for (const auto& mapping : variations_mappings) {

Powered by Google App Engine
This is Rietveld 408576698