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

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

Issue 2289183005: [WeakMemoryCache] Cleanup Field-Trial code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) 191 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs))
192 WebRuntimeFeatures::enableUnsafeES3APIs(true); 192 WebRuntimeFeatures::enableUnsafeES3APIs(true);
193 193
194 if (command_line.HasSwitch(switches::kEnableWebVR)) 194 if (command_line.HasSwitch(switches::kEnableWebVR))
195 WebRuntimeFeatures::enableWebVR(true); 195 WebRuntimeFeatures::enableWebVR(true);
196 196
197 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) 197 if (command_line.HasSwitch(switches::kDisablePresentationAPI))
198 WebRuntimeFeatures::enablePresentationAPI(false); 198 WebRuntimeFeatures::enablePresentationAPI(false);
199 199
200 if (base::FeatureList::IsEnabled(features::kWeakMemoryCache))
201 WebRuntimeFeatures::enableWeakMemoryCache(true);
202
203 if (base::FeatureList::IsEnabled(features::kDoNotUnlockSharedBuffer))
204 WebRuntimeFeatures::enableDoNotUnlockSharedBuffer(true);
205
206 const std::string webfonts_intervention_v2_group_name = 200 const std::string webfonts_intervention_v2_group_name =
207 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); 201 base::FieldTrialList::FindFullName("WebFontsInterventionV2");
208 const std::string webfonts_intervention_v2_about_flag = 202 const std::string webfonts_intervention_v2_about_flag =
209 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); 203 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2);
210 if (!webfonts_intervention_v2_about_flag.empty()) { 204 if (!webfonts_intervention_v2_about_flag.empty()) {
211 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( 205 WebRuntimeFeatures::enableWebFontsInterventionV2With2G(
212 webfonts_intervention_v2_about_flag.compare( 206 webfonts_intervention_v2_about_flag.compare(
213 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == 207 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) ==
214 0); 208 0);
215 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G( 209 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G(
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 296 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
303 std::vector<std::string> disabled_features = base::SplitString( 297 std::vector<std::string> disabled_features = base::SplitString(
304 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 298 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
305 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 299 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
306 for (const std::string& feature : disabled_features) 300 for (const std::string& feature : disabled_features)
307 WebRuntimeFeatures::enableFeatureFromString(feature, false); 301 WebRuntimeFeatures::enableFeatureFromString(feature, false);
308 } 302 }
309 } 303 }
310 304
311 } // namespace content 305 } // 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