Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Side by Side Diff: content/child/runtime_features.cc

Issue 1876473002: Add a feature flag for enabling subscription restrictions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (command_line.HasSwitch(switches::kDisableNotifications)) { 76 if (command_line.HasSwitch(switches::kDisableNotifications)) {
77 WebRuntimeFeatures::enableNotifications(false); 77 WebRuntimeFeatures::enableNotifications(false);
78 78
79 // Chrome's Push Messaging implementation relies on Web Notifications. 79 // Chrome's Push Messaging implementation relies on Web Notifications.
80 WebRuntimeFeatures::enablePushMessaging(false); 80 WebRuntimeFeatures::enablePushMessaging(false);
81 } 81 }
82 82
83 if (command_line.HasSwitch(switches::kEnableNotificationActionIcons)) 83 if (command_line.HasSwitch(switches::kEnableNotificationActionIcons))
84 WebRuntimeFeatures::enableNotificationActionIcons(true); 84 WebRuntimeFeatures::enableNotificationActionIcons(true);
85 85
86 if (base::FeatureList::IsEnabled(features::kWebPushProtocol))
87 WebRuntimeFeatures::enablePushSubscriptionRestrictions(true);
88
86 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) 89 if (command_line.HasSwitch(switches::kDisableSharedWorkers))
87 WebRuntimeFeatures::enableSharedWorker(false); 90 WebRuntimeFeatures::enableSharedWorker(false);
88 91
89 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) 92 if (command_line.HasSwitch(switches::kDisableSpeechAPI))
90 WebRuntimeFeatures::enableScriptedSpeech(false); 93 WebRuntimeFeatures::enableScriptedSpeech(false);
91 94
92 if (command_line.HasSwitch(switches::kDisableFileSystem)) 95 if (command_line.HasSwitch(switches::kDisableFileSystem))
93 WebRuntimeFeatures::enableFileSystem(false); 96 WebRuntimeFeatures::enableFileSystem(false);
94 97
95 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) 98 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures))
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 214 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
212 std::vector<std::string> disabled_features = base::SplitString( 215 std::vector<std::string> disabled_features = base::SplitString(
213 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 216 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
214 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 217 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
215 for (const std::string& feature : disabled_features) 218 for (const std::string& feature : disabled_features)
216 WebRuntimeFeatures::enableFeatureFromString(feature, false); 219 WebRuntimeFeatures::enableFeatureFromString(feature, false);
217 } 220 }
218 } 221 }
219 222
220 } // namespace content 223 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698