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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 172 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
173 command_line.HasSwitch( | 173 command_line.HasSwitch( |
174 switches::kEnableExperimentalWebPlatformFeatures)) { | 174 switches::kEnableExperimentalWebPlatformFeatures)) { |
175 WebRuntimeFeatures::enableNetworkInformation(true); | 175 WebRuntimeFeatures::enableNetworkInformation(true); |
176 } | 176 } |
177 | 177 |
178 if (command_line.HasSwitch(switches::kEnableCredentialManagerAPI)) | 178 if (command_line.HasSwitch(switches::kEnableCredentialManagerAPI)) |
179 WebRuntimeFeatures::enableCredentialManagerAPI(true); | 179 WebRuntimeFeatures::enableCredentialManagerAPI(true); |
180 | 180 |
181 if (command_line.HasSwitch(switches::kDisableSVG1DOM)) { | |
182 WebRuntimeFeatures::enableSVG1DOM(false); | |
183 } | |
184 | |
185 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) | 181 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) |
186 WebRuntimeFeatures::enableReducedReferrerGranularity(true); | 182 WebRuntimeFeatures::enableReducedReferrerGranularity(true); |
187 | 183 |
188 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) | 184 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) |
189 WebRuntimeFeatures::enablePermissionsAPI(false); | 185 WebRuntimeFeatures::enablePermissionsAPI(false); |
190 | 186 |
191 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) | 187 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) |
192 WebRuntimeFeatures::enableV8IdleTasks(false); | 188 WebRuntimeFeatures::enableV8IdleTasks(false); |
193 else | 189 else |
194 WebRuntimeFeatures::enableV8IdleTasks(true); | 190 WebRuntimeFeatures::enableV8IdleTasks(true); |
(...skipping 22 matching lines...) Expand all Loading... |
217 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 213 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
218 std::vector<std::string> disabled_features = base::SplitString( | 214 std::vector<std::string> disabled_features = base::SplitString( |
219 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 215 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
220 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 216 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
221 for (const std::string& feature : disabled_features) | 217 for (const std::string& feature : disabled_features) |
222 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 218 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
223 } | 219 } |
224 } | 220 } |
225 | 221 |
226 } // namespace content | 222 } // namespace content |
OLD | NEW |