Mikel Astiz | 3de672e | 2023-02-21 21:49:19 | [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 | #include "google_apis/credentials_mode.h" |
| 6 | |
| 7 | #include "base/feature_list.h" |
| 8 | #include "services/network/public/mojom/fetch_api.mojom.h" |
| 9 | |
| 10 | namespace google_apis { |
| 11 | |
| 12 | namespace { |
| 13 | |
| 14 | BASE_FEATURE(kGaiaCredentialsModeOmitBug_775438_Workaround, |
| 15 | "GaiaCredentialsModeOmitBug_775438_Workaround", |
| 16 | base::FEATURE_ENABLED_BY_DEFAULT); |
| 17 | |
| 18 | } // namespace |
| 19 | |
| 20 | network::mojom::CredentialsMode GetOmitCredentialsModeForGaiaRequests() { |
| 21 | return base::FeatureList::IsEnabled( |
| 22 | kGaiaCredentialsModeOmitBug_775438_Workaround) |
| 23 | ? network::mojom::CredentialsMode::kOmitBug_775438_Workaround |
| 24 | : network::mojom::CredentialsMode::kOmit; |
| 25 | } |
| 26 | |
| 27 | } // namespace google_apis |