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

Side by Side 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 unified diff | Download patch
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/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 if (command_line.HasSwitch(switches::kEnableWebVR)) { 203 if (command_line.HasSwitch(switches::kEnableWebVR)) {
204 WebRuntimeFeatures::enableWebVR(true); 204 WebRuntimeFeatures::enableWebVR(true);
205 WebRuntimeFeatures::enableFeatureFromString( 205 WebRuntimeFeatures::enableFeatureFromString(
206 std::string("GeometryInterfaces"), true); 206 std::string("GeometryInterfaces"), true);
207 } 207 }
208 208
209 // Enable explicitly enabled features, and then disable explicitly disabled 209 // Enable explicitly enabled features, and then disable explicitly disabled
210 // ones. 210 // ones.
211 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 211 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
212 std::vector<std::string> enabled_features; 212 std::vector<std::string> enabled_features = base::SplitString(
213 base::SplitString( 213 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
214 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), ',', 214 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
215 &enabled_features); 215 for (const std::string& feature : enabled_features)
216 for (const std::string& feature : enabled_features) {
217 WebRuntimeFeatures::enableFeatureFromString(feature, true); 216 WebRuntimeFeatures::enableFeatureFromString(feature, true);
218 }
219 } 217 }
220 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 218 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
221 std::vector<std::string> disabled_features; 219 std::vector<std::string> disabled_features = base::SplitString(
222 base::SplitString( 220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
223 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', 221 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
224 &disabled_features); 222 for (const std::string& feature : disabled_features)
225 for (const std::string& feature : disabled_features) {
226 WebRuntimeFeatures::enableFeatureFromString(feature, false); 223 WebRuntimeFeatures::enableFeatureFromString(feature, false);
227 }
228 } 224 }
229 } 225 }
230 226
231 } // namespace content 227 } // namespace content
OLDNEW
« 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