| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) | 133 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) |
| 134 WebRuntimeFeatures::enablePreciseMemoryInfo(true); | 134 WebRuntimeFeatures::enablePreciseMemoryInfo(true); |
| 135 | 135 |
| 136 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 136 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
| 137 command_line.HasSwitch( | 137 command_line.HasSwitch( |
| 138 switches::kEnableExperimentalWebPlatformFeatures)) { | 138 switches::kEnableExperimentalWebPlatformFeatures)) { |
| 139 WebRuntimeFeatures::enableNetworkInformation(true); | 139 WebRuntimeFeatures::enableNetworkInformation(true); |
| 140 } | 140 } |
| 141 | 141 |
| 142 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI)) | 142 if (command_line.HasSwitch(switches::kEnableCredentialManagerAPI)) |
| 143 WebRuntimeFeatures::enableCredentialManagerAPI(false); | 143 WebRuntimeFeatures::enableCredentialManagerAPI(true); |
| 144 | 144 |
| 145 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) | 145 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) |
| 146 WebRuntimeFeatures::enableReducedReferrerGranularity(true); | 146 WebRuntimeFeatures::enableReducedReferrerGranularity(true); |
| 147 | 147 |
| 148 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) | 148 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) |
| 149 WebRuntimeFeatures::enablePermissionsAPI(false); | 149 WebRuntimeFeatures::enablePermissionsAPI(false); |
| 150 | 150 |
| 151 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) | 151 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) |
| 152 WebRuntimeFeatures::enableV8IdleTasks(false); | 152 WebRuntimeFeatures::enableV8IdleTasks(false); |
| 153 else | 153 else |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 192 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 193 std::vector<std::string> disabled_features = base::SplitString( | 193 std::vector<std::string> disabled_features = base::SplitString( |
| 194 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 194 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 195 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 195 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 196 for (const std::string& feature : disabled_features) | 196 for (const std::string& feature : disabled_features) |
| 197 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 197 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace content | 201 } // namespace content |
| OLD | NEW |