chromium/chrome/browser/metrics/structured/chrome_structured_metrics_delegate.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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"                       // nogncheck
#include "chrome/browser/metrics/structured/ash_event_storage.h"  // nogncheck
#include "chrome/browser/metrics/structured/ash_structured_metrics_delegate.h"  // nogncheck
#include "chrome/browser/metrics/structured/cros_events_processor.h"  // nogncheck
#include "chrome/browser/metrics/structured/event_logging_features.h"  // nogncheck
#include "chrome/browser/metrics/structured/key_data_provider_ash.h"  // nogncheck
#include "chrome/browser/metrics/structured/metadata_processor_ash.h"  // nogncheck
#include "chrome/browser/metrics/structured/oobe_structured_metrics_watcher.h"  // nogncheck
#include "components/metrics/structured/structured_metrics_recorder.h"  // nogncheck
#include "components/metrics/structured/structured_metrics_service.h"  // nogncheck
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
#include "base/task/current_thread.h"
#include "chrome/browser/metrics/structured/lacros_structured_metrics_delegate.h"  // nogncheck
#endif

namespace metrics::structured {
namespace {

// Platforms for which the StructuredMetricsClient will be initialized for.
enum class StructuredMetricsPlatform {};

#if BUILDFLAG(IS_CHROMEOS)
// Logs initialization of Structured Metrics as a record.
void LogInitializationInChromeOSStructuredMetrics(
    StructuredMetricsPlatform platform) {
  StructuredMetricsClient::Record(
      std::move(events::v2::structured_metrics::Initialization().SetPlatform(
          static_cast<int64_t>(platform))));
}
#endif  // BUILDFLAG(IS_CHROMEOS)

class DefaultDelegate : public RecordingDelegate {};

}  // namespace

ChromeStructuredMetricsDelegate::ChromeStructuredMetricsDelegate() {}

ChromeStructuredMetricsDelegate::~ChromeStructuredMetricsDelegate() = default;

// static
ChromeStructuredMetricsDelegate* ChromeStructuredMetricsDelegate::Get() {}

void ChromeStructuredMetricsDelegate::Initialize() {}

void ChromeStructuredMetricsDelegate::RecordEvent(Event&& event) {}

bool ChromeStructuredMetricsDelegate::IsReadyToRecord() const {}

}  // namespace metrics::structured