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

Side by Side Diff: content/child/runtime_features.cc

Issue 1915113005: [WeakMemoryCache] Field-Trial: Make Reference from MemoryCache to Resource weak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@MemoryCache_1b0
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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 if (command_line.HasSwitch(switches::kEnableWebVR)) { 171 if (command_line.HasSwitch(switches::kEnableWebVR)) {
172 WebRuntimeFeatures::enableWebVR(true); 172 WebRuntimeFeatures::enableWebVR(true);
173 WebRuntimeFeatures::enableFeatureFromString( 173 WebRuntimeFeatures::enableFeatureFromString(
174 std::string("GeometryInterfaces"), true); 174 std::string("GeometryInterfaces"), true);
175 } 175 }
176 176
177 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) 177 if (command_line.HasSwitch(switches::kDisablePresentationAPI))
178 WebRuntimeFeatures::enablePresentationAPI(false); 178 WebRuntimeFeatures::enablePresentationAPI(false);
179 179
180 if (base::FeatureList::IsEnabled(features::kWeakMemoryCache))
181 WebRuntimeFeatures::enableWeakMemoryCache(true);
182
183 if (base::FeatureList::IsEnabled(features::kDoNotUnlockSharedBuffer))
184 WebRuntimeFeatures::enableDoNotUnlockSharedBuffer(true);
185
180 const std::string webfonts_intervention_v2_group_name = 186 const std::string webfonts_intervention_v2_group_name =
181 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); 187 base::FieldTrialList::FindFullName("WebFontsInterventionV2");
182 const std::string webfonts_intervention_v2_about_flag = 188 const std::string webfonts_intervention_v2_about_flag =
183 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); 189 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2);
184 if (!webfonts_intervention_v2_about_flag.empty()) { 190 if (!webfonts_intervention_v2_about_flag.empty()) {
185 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( 191 WebRuntimeFeatures::enableWebFontsInterventionV2With2G(
186 webfonts_intervention_v2_about_flag.compare( 192 webfonts_intervention_v2_about_flag.compare(
187 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == 193 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) ==
188 0); 194 0);
189 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G( 195 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 254 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
249 std::vector<std::string> disabled_features = base::SplitString( 255 std::vector<std::string> disabled_features = base::SplitString(
250 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 256 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
251 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 257 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
252 for (const std::string& feature : disabled_features) 258 for (const std::string& feature : disabled_features)
253 WebRuntimeFeatures::enableFeatureFromString(feature, false); 259 WebRuntimeFeatures::enableFeatureFromString(feature, false);
254 } 260 }
255 } 261 }
256 262
257 } // namespace content 263 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698