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

Unified Diff: content/child/runtime_features.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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: content/child/runtime_features.cc
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index 25c6b0ee2519920758897f95e7346ce262316c5a..176359999f3934f495469eea42dd318a9796dba2 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -209,22 +209,18 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
// 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) {
+ std::vector<std::string> enabled_features = base::SplitString(
+ command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
+ ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ for (const std::string& feature : enabled_features)
WebRuntimeFeatures::enableFeatureFromString(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) {
+ std::vector<std::string> disabled_features = base::SplitString(
+ command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
+ ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ for (const std::string& feature : disabled_features)
WebRuntimeFeatures::enableFeatureFromString(feature, false);
- }
}
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/gpu/media/jpeg_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698