#ifndef CHROME_BROWSER_CONTENT_INDEX_CONTENT_INDEX_METRICS_H_
#define CHROME_BROWSER_CONTENT_INDEX_CONTENT_INDEX_METRICS_H_
#include "base/memory/raw_ptr.h"
#include "third_party/blink/public/mojom/content_index/content_index.mojom.h"
namespace content {
class WebContents;
}
namespace ukm {
class UkmBackgroundRecorderService;
}
namespace url {
class Origin;
}
class ContentIndexMetrics {
public:
explicit ContentIndexMetrics(
ukm::UkmBackgroundRecorderService* ukm_background_service);
ContentIndexMetrics(const ContentIndexMetrics&) = delete;
ContentIndexMetrics& operator=(const ContentIndexMetrics&) = delete;
~ContentIndexMetrics();
void RecordContentAdded(const url::Origin& origin,
blink::mojom::ContentCategory category);
void RecordContentOpened(content::WebContents* web_contents,
blink::mojom::ContentCategory category);
void RecordContentDeletedByUser(const url::Origin& origin);
private:
raw_ptr<ukm::UkmBackgroundRecorderService> ukm_background_service_;
};
#endif