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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 WebRuntimeFeatures::enableExperimentalFeatures(true); | 93 WebRuntimeFeatures::enableExperimentalFeatures(true); |
94 | 94 |
95 SetRuntimeFeatureDefaultsForPlatform(); | 95 SetRuntimeFeatureDefaultsForPlatform(); |
96 | 96 |
97 if (command_line.HasSwitch(switches::kDisableDatabases)) | 97 if (command_line.HasSwitch(switches::kDisableDatabases)) |
98 WebRuntimeFeatures::enableDatabase(false); | 98 WebRuntimeFeatures::enableDatabase(false); |
99 | 99 |
100 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler)) | 100 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler)) |
101 WebRuntimeFeatures::enableBlinkScheduler(false); | 101 WebRuntimeFeatures::enableBlinkScheduler(false); |
102 | 102 |
103 if (command_line.HasSwitch(switches::kDisableLocalStorage)) | |
104 WebRuntimeFeatures::enableLocalStorage(false); | |
105 | |
106 if (command_line.HasSwitch(switches::kDisableMediaSource)) | 103 if (command_line.HasSwitch(switches::kDisableMediaSource)) |
107 WebRuntimeFeatures::enableMediaSource(false); | 104 WebRuntimeFeatures::enableMediaSource(false); |
108 | 105 |
109 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 106 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
110 WebRuntimeFeatures::enableNotifications(false); | 107 WebRuntimeFeatures::enableNotifications(false); |
111 | 108 |
112 // Chrome's Push Messaging implementation relies on Web Notifications. | 109 // Chrome's Push Messaging implementation relies on Web Notifications. |
113 WebRuntimeFeatures::enablePushMessaging(false); | 110 WebRuntimeFeatures::enablePushMessaging(false); |
114 } | 111 } |
115 | 112 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |