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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 } | 364 } |
365 | 365 |
366 if (base::FeatureList::IsEnabled(features::kLoadingWithMojo)) | 366 if (base::FeatureList::IsEnabled(features::kLoadingWithMojo)) |
367 WebRuntimeFeatures::enableLoadingWithMojo(true); | 367 WebRuntimeFeatures::enableLoadingWithMojo(true); |
368 | 368 |
369 if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources)) { | 369 if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources)) { |
370 WebRuntimeFeatures::enableFeatureFromString("BlockCredentialedSubresources", | 370 WebRuntimeFeatures::enableFeatureFromString("BlockCredentialedSubresources", |
371 false); | 371 false); |
372 } | 372 } |
373 | 373 |
| 374 WebRuntimeFeatures::enableFeatureFromString( |
| 375 "AllowInsecureDataUrlNavigations", |
| 376 base::FeatureList::IsEnabled(features::kAllowInsecureDataUrlNavigations)); |
| 377 |
374 // Enable explicitly enabled features, and then disable explicitly disabled | 378 // Enable explicitly enabled features, and then disable explicitly disabled |
375 // ones. | 379 // ones. |
376 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { | 380 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |
377 std::vector<std::string> enabled_features = base::SplitString( | 381 std::vector<std::string> enabled_features = base::SplitString( |
378 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), | 382 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), |
379 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 383 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
380 for (const std::string& feature : enabled_features) | 384 for (const std::string& feature : enabled_features) |
381 WebRuntimeFeatures::enableFeatureFromString(feature, true); | 385 WebRuntimeFeatures::enableFeatureFromString(feature, true); |
382 } | 386 } |
383 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 387 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
384 std::vector<std::string> disabled_features = base::SplitString( | 388 std::vector<std::string> disabled_features = base::SplitString( |
385 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 389 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
386 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 390 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
387 for (const std::string& feature : disabled_features) | 391 for (const std::string& feature : disabled_features) |
388 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 392 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
389 } | 393 } |
390 } | 394 } |
391 | 395 |
392 } // namespace content | 396 } // namespace content |
OLD | NEW |