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