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

Side by Side Diff: chrome/common/chrome_features.cc

Issue 2910843002: [Cleanup] Move all browsertests to use ScopedFeatureList to modify features
Patch Set: Ilya comments addressed Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/common/chrome_features.h" 5 #include "chrome/common/chrome_features.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "extensions/features/features.h" 9 #include "extensions/features/features.h"
10 #include "ppapi/features/features.h" 10 #include "ppapi/features/features.h"
11 11
12 namespace features { 12 namespace features {
13 13
14 // All features in alphabetical order. 14 // All features in alphabetical order.
15 15
16 // Enbales Ads Metrics.
17 const base::Feature kAdsFeature{"AdsMetrics", base::FEATURE_ENABLED_BY_DEFAULT};
18
16 #if defined(OS_ANDROID) 19 #if defined(OS_ANDROID)
17 const base::Feature kAllowAutoplayUnmutedInWebappManifestScope{ 20 const base::Feature kAllowAutoplayUnmutedInWebappManifestScope{
18 "AllowAutoplayUnmutedInWebappManifestScope", 21 "AllowAutoplayUnmutedInWebappManifestScope",
19 base::FEATURE_ENABLED_BY_DEFAULT}; 22 base::FEATURE_ENABLED_BY_DEFAULT};
20 #endif // defined(OS_ANDROID) 23 #endif // defined(OS_ANDROID)
21 24
22 #if defined(OS_MACOSX) 25 #if defined(OS_MACOSX)
23 // Enables Javascript execution via AppleScript. 26 // Enables Javascript execution via AppleScript.
24 const base::Feature kAppleScriptExecuteJavaScript{ 27 const base::Feature kAppleScriptExecuteJavaScript{
25 "AppleScriptExecuteJavaScript", base::FEATURE_ENABLED_BY_DEFAULT}; 28 "AppleScriptExecuteJavaScript", base::FEATURE_ENABLED_BY_DEFAULT};
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 const base::Feature kPermissionsBlacklist{ 279 const base::Feature kPermissionsBlacklist{
277 "PermissionsBlacklist", base::FEATURE_DISABLED_BY_DEFAULT}; 280 "PermissionsBlacklist", base::FEATURE_DISABLED_BY_DEFAULT};
278 281
279 // Disables PostScript generation when printing to PostScript capable printers 282 // Disables PostScript generation when printing to PostScript capable printers
280 // and instead sends Emf files. 283 // and instead sends Emf files.
281 #if defined(OS_WIN) 284 #if defined(OS_WIN)
282 const base::Feature kDisablePostScriptPrinting{ 285 const base::Feature kDisablePostScriptPrinting{
283 "DisablePostScriptPrinting", base::FEATURE_DISABLED_BY_DEFAULT}; 286 "DisablePostScriptPrinting", base::FEATURE_DISABLED_BY_DEFAULT};
284 #endif 287 #endif
285 288
289 // Triggers the preconnector on renderer-initiated navigations. This captures
290 // more navigations.
291 const base::Feature kPreconnectMore{"PreconnectMore",
292 base::FEATURE_DISABLED_BY_DEFAULT};
293
286 #if BUILDFLAG(ENABLE_PLUGINS) 294 #if BUILDFLAG(ENABLE_PLUGINS)
287 // Prefer HTML content by hiding Flash from the list of plugins. 295 // Prefer HTML content by hiding Flash from the list of plugins.
288 // https://crbug.com/626728 296 // https://crbug.com/626728
289 const base::Feature kPreferHtmlOverPlugins{"PreferHtmlOverPlugins", 297 const base::Feature kPreferHtmlOverPlugins{"PreferHtmlOverPlugins",
290 base::FEATURE_DISABLED_BY_DEFAULT}; 298 base::FEATURE_DISABLED_BY_DEFAULT};
291 #endif 299 #endif
292 300
293 // Enables the pref service. See https://crbug.com/654988. 301 // Enables the pref service. See https://crbug.com/654988.
294 const base::Feature kPrefService{"PrefService", 302 const base::Feature kPrefService{"PrefService",
295 base::FEATURE_ENABLED_BY_DEFAULT}; 303 base::FEATURE_ENABLED_BY_DEFAULT};
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 return base::FeatureList::IsEnabled(features::kPrefService) || 418 return base::FeatureList::IsEnabled(features::kPrefService) ||
411 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) 419 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
412 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 420 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
413 switches::kMusConfig) == switches::kMash; 421 switches::kMusConfig) == switches::kMash;
414 #else 422 #else
415 false; 423 false;
416 #endif 424 #endif
417 } 425 }
418 426
419 } // namespace features 427 } // namespace features
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698