summaryrefslogtreecommitdiff
path: root/chromium/components/unified_consent
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-12 15:59:20 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-25 06:57:22 +0000
commitf7eaed5286974984ba5f9e3189d8f49d03e99f81 (patch)
treecaed19b2af2024f35449fb0b781d0a25e09d4f8f /chromium/components/unified_consent
parent9729c4479fe23554eae6e6dd1f30ff488f470c84 (diff)
downloadqtwebengine-chromium-f7eaed5286974984ba5f9e3189d8f49d03e99f81.tar.gz
BASELINE: Update Chromium to 100.0.4896.167
Change-Id: I98cbeb5d7543d966ffe04d8cefded0c493a11333 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/unified_consent')
-rw-r--r--chromium/components/unified_consent/README.md2
-rw-r--r--chromium/components/unified_consent/unified_consent_metrics.cc19
2 files changed, 6 insertions, 15 deletions
diff --git a/chromium/components/unified_consent/README.md b/chromium/components/unified_consent/README.md
index e37be17082a..691d9bde706 100644
--- a/chromium/components/unified_consent/README.md
+++ b/chromium/components/unified_consent/README.md
@@ -3,6 +3,4 @@ manages user consent when the Unified Consent feature is enabled. It also
holds the prefs and the APIs allowing the various Chromium features to verify if
the user has given consent for a given feature.
-This component is currently in development.
-
The component is used on all platforms (desktop, ChromeOS, Android and iOS).
diff --git a/chromium/components/unified_consent/unified_consent_metrics.cc b/chromium/components/unified_consent/unified_consent_metrics.cc
index e235a4a6f58..c3bdd21585b 100644
--- a/chromium/components/unified_consent/unified_consent_metrics.cc
+++ b/chromium/components/unified_consent/unified_consent_metrics.cc
@@ -34,9 +34,9 @@ enum class SyncDataType {
kPasswords = 8,
kAutofill = 9,
kPayments = 10,
- kSync = 11,
+ // kSync = 11,
- kMaxValue = kSync
+ kMaxValue = kPayments
};
void RecordSyncDataTypeSample(SyncDataType data_type) {
@@ -50,13 +50,6 @@ void RecordSyncDataTypeSample(SyncDataType data_type) {
// Returns true if a sample was recorded.
bool RecordSyncSetupDataTypesImpl(syncer::SyncUserSettings* sync_settings,
PrefService* pref_service) {
-#if defined(OS_ANDROID)
- if (!sync_settings->IsSyncRequested()) {
- RecordSyncDataTypeSample(SyncDataType::kSync);
- return true; // Don't record states of data types if sync is disabled.
- }
-#endif
-
bool metric_recorded = false;
std::vector<std::pair<SyncDataType, syncer::UserSelectableType>> sync_types;
@@ -72,7 +65,7 @@ bool RecordSyncSetupDataTypesImpl(syncer::SyncUserSettings* sync_settings,
syncer::UserSelectableType::kPasswords);
sync_types.emplace_back(SyncDataType::kAutofill,
syncer::UserSelectableType::kAutofill);
-#if !defined(OS_ANDROID)
+#if !BUILDFLAG(IS_ANDROID)
sync_types.emplace_back(SyncDataType::kApps,
syncer::UserSelectableType::kApps);
sync_types.emplace_back(SyncDataType::kExtensions,
@@ -81,9 +74,9 @@ bool RecordSyncSetupDataTypesImpl(syncer::SyncUserSettings* sync_settings,
syncer::UserSelectableType::kThemes);
#endif
- for (const auto& data_type : sync_types) {
- if (!sync_settings->GetSelectedTypes().Has(data_type.second)) {
- RecordSyncDataTypeSample(data_type.first);
+ for (const auto& [bucket, type] : sync_types) {
+ if (!sync_settings->GetSelectedTypes().Has(type)) {
+ RecordSyncDataTypeSample(bucket);
metric_recorded = true;
}
}