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