OLD | NEW |
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" |
(...skipping 22 matching lines...) Expand all Loading... |
33 // Whether to handle low memory kill of ARC apps by Chrome. | 33 // Whether to handle low memory kill of ARC apps by Chrome. |
34 const base::Feature kArcMemoryManagement{ | 34 const base::Feature kArcMemoryManagement{ |
35 "ArcMemoryManagement", base::FEATURE_ENABLED_BY_DEFAULT}; | 35 "ArcMemoryManagement", base::FEATURE_ENABLED_BY_DEFAULT}; |
36 #endif // defined(OS_CHROMEOS) | 36 #endif // defined(OS_CHROMEOS) |
37 | 37 |
38 // If enabled, the list of content suggestions on the New Tab page will contain | 38 // If enabled, the list of content suggestions on the New Tab page will contain |
39 // assets (e.g. books, pictures, audio) that the user downloaded for later use. | 39 // assets (e.g. books, pictures, audio) that the user downloaded for later use. |
40 const base::Feature kAssetDownloadSuggestionsFeature{ | 40 const base::Feature kAssetDownloadSuggestionsFeature{ |
41 "NTPAssetDownloadSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; | 41 "NTPAssetDownloadSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; |
42 | 42 |
43 #if !defined(OS_ANDROID) && !defined(OS_IOS) | |
44 // Enables auto-dismissing JavaScript dialogs. | |
45 const base::Feature kAutoDismissingDialogs{"AutoDismissingDialogs", | |
46 base::FEATURE_ENABLED_BY_DEFAULT}; | |
47 #endif | |
48 | |
49 #if defined(OS_WIN) || defined(OS_MACOSX) | 43 #if defined(OS_WIN) || defined(OS_MACOSX) |
50 // Enables automatic tab discarding, when the system is in low memory state. | 44 // Enables automatic tab discarding, when the system is in low memory state. |
51 const base::Feature kAutomaticTabDiscarding{"AutomaticTabDiscarding", | 45 const base::Feature kAutomaticTabDiscarding{"AutomaticTabDiscarding", |
52 base::FEATURE_ENABLED_BY_DEFAULT}; | 46 base::FEATURE_ENABLED_BY_DEFAULT}; |
53 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 47 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
54 | 48 |
55 #if defined(OS_WIN) || defined(OS_LINUX) | 49 #if defined(OS_WIN) || defined(OS_LINUX) |
56 // Enables the Restart background mode optimization. When all Chrome UI is | 50 // Enables the Restart background mode optimization. When all Chrome UI is |
57 // closed and it goes in the background, allows to restart the browser to | 51 // closed and it goes in the background, allows to restart the browser to |
58 // discard memory. | 52 // discard memory. |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 return base::FeatureList::IsEnabled(features::kPrefService) || | 384 return base::FeatureList::IsEnabled(features::kPrefService) || |
391 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 385 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
392 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 386 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
393 switches::kMusConfig) == switches::kMash; | 387 switches::kMusConfig) == switches::kMash; |
394 #else | 388 #else |
395 false; | 389 false; |
396 #endif | 390 #endif |
397 } | 391 } |
398 | 392 |
399 } // namespace features | 393 } // namespace features |
OLD | NEW |