| OLD | NEW |
| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 WebRuntimeFeatures::enableFeatureFromString( | 281 WebRuntimeFeatures::enableFeatureFromString( |
| 282 "FontCacheScaling", | 282 "FontCacheScaling", |
| 283 base::FeatureList::IsEnabled(features::kFontCacheScaling)); | 283 base::FeatureList::IsEnabled(features::kFontCacheScaling)); |
| 284 | 284 |
| 285 WebRuntimeFeatures::enableFeatureFromString( | 285 WebRuntimeFeatures::enableFeatureFromString( |
| 286 "FramebustingNeedsSameOriginOrUserGesture", | 286 "FramebustingNeedsSameOriginOrUserGesture", |
| 287 base::FeatureList::IsEnabled( | 287 base::FeatureList::IsEnabled( |
| 288 features::kFramebustingNeedsSameOriginOrUserGesture)); | 288 features::kFramebustingNeedsSameOriginOrUserGesture)); |
| 289 | 289 |
| 290 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | |
| 291 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | |
| 292 | |
| 293 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) | 290 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) |
| 294 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); | 291 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); |
| 295 | 292 |
| 296 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling( | 293 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling( |
| 297 base::FeatureList::IsEnabled( | 294 base::FeatureList::IsEnabled( |
| 298 features::kExpensiveBackgroundTimerThrottling)); | 295 features::kExpensiveBackgroundTimerThrottling)); |
| 299 | 296 |
| 300 if (base::FeatureList::IsEnabled(features::kHeapCompaction)) | 297 if (base::FeatureList::IsEnabled(features::kHeapCompaction)) |
| 301 WebRuntimeFeatures::enableHeapCompaction(true); | 298 WebRuntimeFeatures::enableHeapCompaction(true); |
| 302 | 299 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 368 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 372 std::vector<std::string> disabled_features = base::SplitString( | 369 std::vector<std::string> disabled_features = base::SplitString( |
| 373 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 370 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 374 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 371 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 375 for (const std::string& feature : disabled_features) | 372 for (const std::string& feature : disabled_features) |
| 376 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 373 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 377 } | 374 } |
| 378 } | 375 } |
| 379 | 376 |
| 380 } // namespace content | 377 } // namespace content |
| OLD | NEW |