#include "chrome/browser/content_index/content_index_metrics.h"
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/metrics/ukm_background_recorder_service.h"
#include "content/public/browser/web_contents.h"
#include "net/base/network_change_notifier.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
namespace {
void MaybeRecordUkmContentAdded(blink::mojom::ContentCategory category,
std::optional<ukm::SourceId> source_id) { … }
void MaybeRecordUkmContentDeletedByUser(
std::optional<ukm::SourceId> source_id) { … }
}
ContentIndexMetrics::ContentIndexMetrics(
ukm::UkmBackgroundRecorderService* ukm_background_service)
: … { … }
ContentIndexMetrics::~ContentIndexMetrics() = default;
void ContentIndexMetrics::RecordContentAdded(
const url::Origin& origin,
blink::mojom::ContentCategory category) { … }
void ContentIndexMetrics::RecordContentOpened(
content::WebContents* web_contents,
blink::mojom::ContentCategory category) { … }
void ContentIndexMetrics::RecordContentDeletedByUser(
const url::Origin& origin) { … }