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