Mihai Sardarescu | 160ec66 | 2018-07-18 21:13:51 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_UNIFIED_CONSENT_FEATURE_H_ |
| 6 | #define COMPONENTS_UNIFIED_CONSENT_FEATURE_H_ |
| 7 | |
| 8 | #include "base/feature_list.h" |
| 9 | |
| 10 | namespace unified_consent { |
| 11 | |
| 12 | // State of the "Unified Consent" feature. |
| 13 | enum class UnifiedConsentFeatureState { |
| 14 | // Unified consent is disabled. |
| 15 | kDisabled, |
| 16 | // Unified consent is enabled, but the bump is not shown. |
| 17 | kEnabledNoBump, |
| 18 | // Unified consent is enabled and the bump is shown. |
| 19 | kEnabledWithBump |
| 20 | }; |
| 21 | |
| 22 | // Improved and unified consent for privacy-related features. |
| 23 | extern const base::Feature kUnifiedConsent; |
| 24 | extern const char kUnifiedConsentShowBumpParameter[]; |
Jérôme Lebel | fe1b2e0 | 2018-08-03 12:26:20 | [diff] [blame] | 25 | extern const base::Feature kForceUnifiedConsentBump; |
Mihai Sardarescu | 160ec66 | 2018-07-18 21:13:51 | [diff] [blame] | 26 | |
Mihai Sardarescu | 29a8cd8 | 2018-09-05 16:52:20 | [diff] [blame^] | 27 | // Returns true if the unified consent feature state is kEnabledNoBump or |
| 28 | // kEnabledWithBump. Note that the bump may not be enabled, even if this returns |
| 29 | // true. To check if the bump is enabled, use |
| 30 | // IsUnifiedConsentFeatureWithBumpEnabled(). |
| 31 | bool IsUnifiedConsentFeatureEnabled(); |
| 32 | |
| 33 | // Returns true if the unified consent feature state is kEnabledWithBump. |
| 34 | bool IsUnifiedConsentFeatureWithBumpEnabled(); |
Mihai Sardarescu | 160ec66 | 2018-07-18 21:13:51 | [diff] [blame] | 35 | |
| 36 | } // namespace unified_consent |
| 37 | |
| 38 | #endif // COMPONENTS_UNIFIED_CONSENT_FEATURE_H_ |