#include "chrome/browser/metrics/ukm_background_recorder_service.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "components/history/core/browser/history_service.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "url/origin.h"
namespace ukm {
UkmBackgroundRecorderService::UkmBackgroundRecorderService(Profile* profile)
: … { … }
UkmBackgroundRecorderService::~UkmBackgroundRecorderService() = default;
void UkmBackgroundRecorderService::Shutdown() { … }
void UkmBackgroundRecorderService::GetBackgroundSourceIdIfAllowed(
const url::Origin& origin,
GetBackgroundSourceIdCallback callback) { … }
void UkmBackgroundRecorderService::DidGetVisibleVisitCount(
const url::Origin& origin,
GetBackgroundSourceIdCallback callback,
history::VisibleVisitCountToHostResult result) { … }
UkmBackgroundRecorderFactory* UkmBackgroundRecorderFactory::GetInstance() { … }
UkmBackgroundRecorderService* UkmBackgroundRecorderFactory::GetForProfile(
Profile* profile) { … }
UkmBackgroundRecorderFactory::UkmBackgroundRecorderFactory()
: … { … }
UkmBackgroundRecorderFactory::~UkmBackgroundRecorderFactory() = default;
std::unique_ptr<KeyedService>
UkmBackgroundRecorderFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const { … }
}