#include "chrome/browser/metrics/structured/chrome_structured_metrics_delegate.h"
#include <stdint.h>
#include <utility>
#include "base/no_destructor.h"
#include "components/metrics/structured/recorder.h"
#include "components/metrics/structured/structured_metrics_client.h"
#include "components/metrics/structured/structured_metrics_features.h"
#include "components/metrics_services_manager/metrics_services_manager.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/login/startup_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/structured/ash_event_storage.h"
#include "chrome/browser/metrics/structured/ash_structured_metrics_delegate.h"
#include "chrome/browser/metrics/structured/cros_events_processor.h"
#include "chrome/browser/metrics/structured/event_logging_features.h"
#include "chrome/browser/metrics/structured/key_data_provider_ash.h"
#include "chrome/browser/metrics/structured/metadata_processor_ash.h"
#include "chrome/browser/metrics/structured/oobe_structured_metrics_watcher.h"
#include "components/metrics/structured/structured_metrics_recorder.h"
#include "components/metrics/structured/structured_metrics_service.h"
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
#include "base/task/current_thread.h"
#include "chrome/browser/metrics/structured/lacros_structured_metrics_delegate.h"
#endif
namespace metrics::structured {
namespace {
enum class StructuredMetricsPlatform { … };
#if BUILDFLAG(IS_CHROMEOS)
void LogInitializationInChromeOSStructuredMetrics(
StructuredMetricsPlatform platform) {
StructuredMetricsClient::Record(
std::move(events::v2::structured_metrics::Initialization().SetPlatform(
static_cast<int64_t>(platform))));
}
#endif
class DefaultDelegate : public RecordingDelegate { … };
}
ChromeStructuredMetricsDelegate::ChromeStructuredMetricsDelegate() { … }
ChromeStructuredMetricsDelegate::~ChromeStructuredMetricsDelegate() = default;
ChromeStructuredMetricsDelegate* ChromeStructuredMetricsDelegate::Get() { … }
void ChromeStructuredMetricsDelegate::Initialize() { … }
void ChromeStructuredMetricsDelegate::RecordEvent(Event&& event) { … }
bool ChromeStructuredMetricsDelegate::IsReadyToRecord() const { … }
}