Igor Ruvinov | 8a138d00 | 2023-05-12 16:19:20 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 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 CHROME_BROWSER_ENTERPRISE_PROFILE_MANAGEMENT_PROFILE_MANAGEMENT_FEATURES_H_ |
| 6 | #define CHROME_BROWSER_ENTERPRISE_PROFILE_MANAGEMENT_PROFILE_MANAGEMENT_FEATURES_H_ |
| 7 | |
| 8 | #include "base/feature_list.h" |
Zonghan Xu | 7975f9f | 2024-02-22 02:10:05 | [diff] [blame] | 9 | #include "base/metrics/field_trial_params.h" |
Igor Ruvinov | 8a138d00 | 2023-05-12 16:19:20 | [diff] [blame] | 10 | #include "build/build_config.h" |
| 11 | |
Igor Ruvinov | 86e4c99 | 2023-05-23 16:11:33 | [diff] [blame] | 12 | namespace profile_management::features { |
Igor Ruvinov | 8a138d00 | 2023-05-12 16:19:20 | [diff] [blame] | 13 | |
| 14 | // Controls whether third-party profile management is enabled. |
| 15 | BASE_DECLARE_FEATURE(kThirdPartyProfileManagement); |
| 16 | |
Igor Ruvinov | 86e4c99 | 2023-05-23 16:11:33 | [diff] [blame] | 17 | // Controls whether token-based profile management is enabled. |
| 18 | BASE_DECLARE_FEATURE(kEnableProfileTokenManagement); |
| 19 | |
Zonghan Xu | 7975f9f | 2024-02-22 02:10:05 | [diff] [blame] | 20 | // Controls whether OIDC-response profile management is enabled. |
| 21 | BASE_DECLARE_FEATURE(kOidcAuthProfileManagement); |
| 22 | |
Zonghan Xu | b7da843d | 2024-09-03 20:23:28 | [diff] [blame] | 23 | // Controls whether OIDC profile enrollment can be started from navigation |
| 24 | // response in addition to redirections. |
| 25 | BASE_DECLARE_FEATURE(kOidcAuthResponseInterception); |
| 26 | |
Zonghan Xu | 5264e6a | 2024-08-09 14:53:04 | [diff] [blame] | 27 | // Controls whether OIDC enrollment process can time out (and after how long). |
| 28 | BASE_DECLARE_FEATURE(kOidcEnrollmentTimeout); |
| 29 | |
hmare | f6ee8f31d | 2024-07-04 10:22:08 | [diff] [blame] | 30 | // Controls whether the generic OIDC-response profile management is enabled. |
| 31 | BASE_DECLARE_FEATURE(kEnableGenericOidcAuthProfileManagement); |
| 32 | |
Zonghan Xu | b5ae5c7 | 2024-09-05 18:49:26 | [diff] [blame] | 33 | // Controls whether to add a list of hosts that are eligible for OIDC profile |
| 34 | // enrollments. |
| 35 | BASE_DECLARE_FEATURE(kOidcEnrollmentAuthSource); |
| 36 | |
Zonghan Xu | 18cface | 2024-11-19 22:18:44 | [diff] [blame] | 37 | // Controls whether OIDC interception from navigation auth header instead of the |
| 38 | // usual URL params is permitted. This flag only works on Chrome Canary or Dev. |
| 39 | BASE_DECLARE_FEATURE(kOidcAuthHeaderInterception); |
| 40 | |
Zonghan Xu | 7975f9f | 2024-02-22 02:10:05 | [diff] [blame] | 41 | // Oidc authentication related feature params. |
| 42 | extern const base::FeatureParam<std::string> kOidcAuthStubDmToken; |
| 43 | extern const base::FeatureParam<std::string> kOidcAuthStubProfileId; |
| 44 | extern const base::FeatureParam<std::string> kOidcAuthStubClientId; |
| 45 | extern const base::FeatureParam<std::string> kOidcAuthStubUserName; |
| 46 | extern const base::FeatureParam<std::string> kOidcAuthStubUserEmail; |
| 47 | extern const base::FeatureParam<bool> kOidcAuthIsDasherBased; |
Zonghan Xu | 9018c30 | 2025-01-27 17:49:15 | [diff] [blame] | 48 | extern const base::FeatureParam<int> kOidcAuthForceErrorUi; |
Zonghan Xu | abf543cb | 2024-07-19 17:15:38 | [diff] [blame] | 49 | extern const base::FeatureParam<bool> kOidcAuthForceTimeoutUi; |
Zonghan Xu | 5264e6a | 2024-08-09 14:53:04 | [diff] [blame] | 50 | extern const base::FeatureParam<base::TimeDelta> kOidcEnrollRegistrationTimeout; |
Zonghan Xu | 7975f9f | 2024-02-22 02:10:05 | [diff] [blame] | 51 | |
Zonghan Xu | b5ae5c7 | 2024-09-05 18:49:26 | [diff] [blame] | 52 | // List of hosts to be added as eligible to `kOidcEnrollmentAuthSource`, |
| 53 | // takes the form of a comma-separated string. |
| 54 | extern const base::FeatureParam<std::string> kOidcAuthAdditionalHosts; |
| 55 | |
Zonghan Xu | 18cface | 2024-11-19 22:18:44 | [diff] [blame] | 56 | // List of URLs to be added as eligible to `kOidcAuthHeaderInterception`, |
| 57 | // takes the form of a comma-separated string. |
| 58 | extern const base::FeatureParam<std::string> kOidcAuthAdditionalUrls; |
| 59 | |
Igor Ruvinov | 86e4c99 | 2023-05-23 16:11:33 | [diff] [blame] | 60 | } // namespace profile_management::features |
Igor Ruvinov | 8a138d00 | 2023-05-12 16:19:20 | [diff] [blame] | 61 | |
| 62 | #endif // CHROME_BROWSER_ENTERPRISE_PROFILE_MANAGEMENT_PROFILE_MANAGEMENT_FEATURES_H_ |