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

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

Issue 1968653002: Rename flags for Origin Trials framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 7 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Only Android, ChromeOS support NetInfo right now. 54 // Only Android, ChromeOS support NetInfo right now.
55 WebRuntimeFeatures::enableNetworkInformation(false); 55 WebRuntimeFeatures::enableNetworkInformation(false);
56 #endif 56 #endif
57 } 57 }
58 58
59 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( 59 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
60 const base::CommandLine& command_line) { 60 const base::CommandLine& command_line) {
61 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) 61 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures))
62 WebRuntimeFeatures::enableExperimentalFeatures(true); 62 WebRuntimeFeatures::enableExperimentalFeatures(true);
63 63
64 WebRuntimeFeatures::enableExperimentalFramework( 64 WebRuntimeFeatures::enableOriginTrials(
65 base::FeatureList::IsEnabled(features::kExperimentalFramework)); 65 base::FeatureList::IsEnabled(features::kOriginTrials));
66 66
67 if (command_line.HasSwitch(switches::kEnableWebBluetooth)) 67 if (command_line.HasSwitch(switches::kEnableWebBluetooth))
68 WebRuntimeFeatures::enableWebBluetooth(true); 68 WebRuntimeFeatures::enableWebBluetooth(true);
69 69
70 if (!base::FeatureList::IsEnabled(features::kWebUsb)) 70 if (!base::FeatureList::IsEnabled(features::kWebUsb))
71 WebRuntimeFeatures::enableWebUsb(false); 71 WebRuntimeFeatures::enableWebUsb(false);
72 72
73 SetRuntimeFeatureDefaultsForPlatform(); 73 SetRuntimeFeatureDefaultsForPlatform();
74 74
75 if (command_line.HasSwitch(switches::kDisableDatabases)) 75 if (command_line.HasSwitch(switches::kDisableDatabases))
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 212 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
213 std::vector<std::string> disabled_features = base::SplitString( 213 std::vector<std::string> disabled_features = base::SplitString(
214 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 214 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
215 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 215 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
216 for (const std::string& feature : disabled_features) 216 for (const std::string& feature : disabled_features)
217 WebRuntimeFeatures::enableFeatureFromString(feature, false); 217 WebRuntimeFeatures::enableFeatureFromString(feature, false);
218 } 218 }
219 } 219 }
220 220
221 } // namespace content 221 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698