Chromium Code Reviews| Index: content/child/runtime_features.cc |
| diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc |
| index 79b0f244b47fada2de35d0bf87c4ceb00b426adc..73aa0d1b7ce6b44c9567e0bf4d8fd6ba89d736f4 100644 |
| --- a/content/child/runtime_features.cc |
| +++ b/content/child/runtime_features.cc |
| @@ -4,8 +4,11 @@ |
| #include "content/child/runtime_features.h" |
| +#include <vector> |
| + |
| #include "base/command_line.h" |
| #include "base/metrics/field_trial.h" |
| +#include "base/strings/string_split.h" |
| #include "content/common/content_switches_internal.h" |
| #include "content/public/common/content_switches.h" |
| #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| @@ -186,6 +189,27 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
| WebRuntimeFeatures::enableV8IdleTasks(false); |
| else |
| WebRuntimeFeatures::enableV8IdleTasks(true); |
| + |
| + // Enable explicitly enabled features, and then disable explicitly disabled |
| + // ones. |
| + if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |
| + std::vector<std::string> enabled_features; |
| + base::SplitString( |
| + command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), ',', |
| + &enabled_features); |
| + for (const std::string& feature : enabled_features) |
|
jochen (gone - plz use gerrit)
2015/02/04 12:39:20
please add {}
jbroman
2015/02/04 15:49:21
Done.
|
| + WebRuntimeFeatures::enableFeatureFromString( |
| + blink::WebString::fromLatin1(feature), true); |
| + } |
| + if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| + std::vector<std::string> disabled_features; |
| + base::SplitString( |
| + command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
| + &disabled_features); |
| + for (const std::string& feature : disabled_features) |
|
jochen (gone - plz use gerrit)
2015/02/04 12:39:20
same here
jbroman
2015/02/04 15:49:21
Done.
|
| + WebRuntimeFeatures::enableFeatureFromString( |
| + blink::WebString::fromLatin1(feature), false); |
| + } |
| } |
| } // namespace content |