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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 WebRuntimeFeatures::enableExperimentalFeatures(true); | 92 WebRuntimeFeatures::enableExperimentalFeatures(true); |
93 | 93 |
94 SetRuntimeFeatureDefaultsForPlatform(); | 94 SetRuntimeFeatureDefaultsForPlatform(); |
95 | 95 |
96 if (command_line.HasSwitch(switches::kDisableDatabases)) | 96 if (command_line.HasSwitch(switches::kDisableDatabases)) |
97 WebRuntimeFeatures::enableDatabase(false); | 97 WebRuntimeFeatures::enableDatabase(false); |
98 | 98 |
99 if (command_line.HasSwitch(switches::kDisableBlinkScheduler)) | 99 if (command_line.HasSwitch(switches::kDisableBlinkScheduler)) |
100 WebRuntimeFeatures::enableBlinkScheduler(false); | 100 WebRuntimeFeatures::enableBlinkScheduler(false); |
101 | 101 |
102 if (command_line.HasSwitch(switches::kDisableLocalStorage)) | |
103 WebRuntimeFeatures::enableLocalStorage(false); | |
104 | |
105 if (command_line.HasSwitch(switches::kDisableMediaSource)) | 102 if (command_line.HasSwitch(switches::kDisableMediaSource)) |
106 WebRuntimeFeatures::enableMediaSource(false); | 103 WebRuntimeFeatures::enableMediaSource(false); |
107 | 104 |
108 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 105 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
109 WebRuntimeFeatures::enableNotifications(false); | 106 WebRuntimeFeatures::enableNotifications(false); |
110 | 107 |
111 // Chrome's Push Messaging implementation relies on Web Notifications. | 108 // Chrome's Push Messaging implementation relies on Web Notifications. |
112 WebRuntimeFeatures::enablePushMessaging(false); | 109 WebRuntimeFeatures::enablePushMessaging(false); |
113 } | 110 } |
114 | 111 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 222 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
226 &disabled_features); | 223 &disabled_features); |
227 for (const std::string& feature : disabled_features) { | 224 for (const std::string& feature : disabled_features) { |
228 WebRuntimeFeatures::enableFeatureFromString( | 225 WebRuntimeFeatures::enableFeatureFromString( |
229 blink::WebString::fromLatin1(feature), false); | 226 blink::WebString::fromLatin1(feature), false); |
230 } | 227 } |
231 } | 228 } |
232 } | 229 } |
233 | 230 |
234 } // namespace content | 231 } // namespace content |
OLD | NEW |