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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if (command_line.HasSwitch(switches::kDisableSVG1DOM)) { | 181 if (command_line.HasSwitch(switches::kDisableSVG1DOM)) { |
182 WebRuntimeFeatures::enableSVG1DOM(false); | 182 WebRuntimeFeatures::enableSVG1DOM(false); |
183 } | 183 } |
184 | 184 |
185 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) | 185 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) |
186 WebRuntimeFeatures::enableReducedReferrerGranularity(true); | 186 WebRuntimeFeatures::enableReducedReferrerGranularity(true); |
187 | 187 |
188 if (command_line.HasSwitch(switches::kEnablePushMessagePayload)) | 188 if (command_line.HasSwitch(switches::kEnablePushMessagePayload)) |
189 WebRuntimeFeatures::enablePushMessagingData(true); | 189 WebRuntimeFeatures::enablePushMessagingData(true); |
190 | 190 |
191 if (command_line.HasSwitch(switches::kEnablePushMessagingHasPermission)) | |
192 WebRuntimeFeatures::enablePushMessagingHasPermission(true); | |
193 | |
194 // Delete "StaleWhileRevalidate" line from chrome_browser_field_trials.cc | 191 // Delete "StaleWhileRevalidate" line from chrome_browser_field_trials.cc |
195 // when this experiment is done. | 192 // when this experiment is done. |
196 if (base::FieldTrialList::FindFullName("StaleWhileRevalidate") == "Enabled" || | 193 if (base::FieldTrialList::FindFullName("StaleWhileRevalidate") == "Enabled" || |
197 command_line.HasSwitch(switches::kEnableStaleWhileRevalidate)) | 194 command_line.HasSwitch(switches::kEnableStaleWhileRevalidate)) |
198 WebRuntimeFeatures::enableStaleWhileRevalidateCacheControl(true); | 195 WebRuntimeFeatures::enableStaleWhileRevalidateCacheControl(true); |
199 | 196 |
200 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) | 197 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) |
201 WebRuntimeFeatures::enableV8IdleTasks(false); | 198 WebRuntimeFeatures::enableV8IdleTasks(false); |
202 else | 199 else |
203 WebRuntimeFeatures::enableV8IdleTasks(true); | 200 WebRuntimeFeatures::enableV8IdleTasks(true); |
(...skipping 19 matching lines...) Expand all Loading... |
223 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
224 &disabled_features); | 221 &disabled_features); |
225 for (const std::string& feature : disabled_features) { | 222 for (const std::string& feature : disabled_features) { |
226 WebRuntimeFeatures::enableFeatureFromString( | 223 WebRuntimeFeatures::enableFeatureFromString( |
227 blink::WebString::fromLatin1(feature), false); | 224 blink::WebString::fromLatin1(feature), false); |
228 } | 225 } |
229 } | 226 } |
230 } | 227 } |
231 | 228 |
232 } // namespace content | 229 } // namespace content |
OLD | NEW |