[cr146] GetDomainDiversity dropped V2 metrics
This is overall a simplification, as the callback doesn't produce a pair of metrics anymore, but just the desired one. Chromium changes: https://chromium.googlesource.com/chromium/src/+/c63bd9318b07813ff357fc150ab02743e63b332c commit c63bd9318b07813ff357fc150ab02743e63b332c Author: Mark Pearson <mpearson@chromium.org> Date: Mon Feb 2 12:00:02 2026 -0800 Deprecate Domain Diversity V2 metrics. [AI generated summary] This change removes the "V2" versions of the Domain Diversity metrics (History.DomainCount*Day_V2) which included synced visits. The `GetDomainDiversity` API in HistoryBackend and `CountUniqueDomainsVisited` in HistoryDatabase are simplified to only return results based on locally visited domains, as the V3 and V4 metrics only use local counts. The corresponding unit tests and histogram definitions are updated accordingly. BUG=477024476,40896778 OBSOLETE_HISTOGRAMS=Replaced with _V3 and _V4 versions of the histograms. Change-Id: Ibf52839ab6ba8afbbdadabe6cde0b3605b6c5bf0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7528718 Reviewed-by: Marc Treib <treib@chromium.org> Commit-Queue: Mark Pearson <mpearson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1578302}
This commit is contained in:
@@ -333,14 +333,13 @@ void PageMetrics::ReportFirstPageLoadTime() {
|
||||
}
|
||||
|
||||
void PageMetrics::OnDomainDiversityResult(
|
||||
std::pair<history::DomainDiversityResults, history::DomainDiversityResults>
|
||||
metrics) {
|
||||
if (metrics.first.empty() || metrics.second.empty()) {
|
||||
history::DomainDiversityResults metrics) {
|
||||
if (metrics.empty()) {
|
||||
return;
|
||||
}
|
||||
// The second entry in the pair counts both local, and foreign (synced)
|
||||
// visits.
|
||||
const history::DomainMetricSet& metric_set = metrics.first.front();
|
||||
const history::DomainMetricSet& metric_set = metrics.front();
|
||||
if (!metric_set.seven_day_metric.has_value()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -105,9 +105,7 @@ class PageMetrics : public DefaultBrowserMonitor::Observer {
|
||||
uint64_t name_hash,
|
||||
base::HistogramBase::Sample32 sample);
|
||||
|
||||
void OnDomainDiversityResult(
|
||||
std::pair<history::DomainDiversityResults,
|
||||
history::DomainDiversityResults> result);
|
||||
void OnDomainDiversityResult(history::DomainDiversityResults metrics);
|
||||
|
||||
void OnBookmarkCountResult(
|
||||
std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result);
|
||||
|
||||
Reference in New Issue
Block a user