chromium/components/media_router/browser/media_router_metrics.cc

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

#include "components/media_router/browser/media_router_metrics.h"

#include <algorithm>

#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/time/default_clock.h"
#include "components/media_router/common/media_route_provider_helper.h"
#include "components/media_router/common/media_sink.h"
#include "components/media_router/common/media_source.h"
#include "components/media_router/common/mojom/media_router.mojom.h"
#include "url/gurl.h"
#include "url/url_constants.h"

namespace media_router {

namespace {

constexpr char kHistogramProviderCreateRouteResult[] =;
constexpr char kHistogramProviderJoinRouteResult[] =;
constexpr char kHistogramProviderTerminateRouteResult[] =;

std::string GetHistogramNameForProvider(
    const std::string& base_name,
    std::optional<mojom::MediaRouteProviderId> provider_id) {}

PresentationUrlType GetPresentationUrlType(const GURL& url) {}

}  // namespace

MediaRouterMetrics::MediaRouterMetrics() = default;
MediaRouterMetrics::~MediaRouterMetrics() = default;

// static
const char MediaRouterMetrics::kHistogramIconClickLocation[] =;
const char MediaRouterMetrics::kHistogramMediaRouterFileFormat[] =;
const char MediaRouterMetrics::kHistogramMediaRouterFileSize[] =;
const char MediaRouterMetrics::kHistogramMediaSinkType[] =;
const char MediaRouterMetrics::kHistogramPresentationUrlType[] =;
const char MediaRouterMetrics::kHistogramUiDeviceCount[] =;
const char MediaRouterMetrics::kHistogramUiDialogIconStateAtOpen[] =;
const char MediaRouterMetrics::kHistogramUiCastDialogLoadedWithData[] =;
const char MediaRouterMetrics::kHistogramUiGmcDialogLoadedWithData[] =;
const char MediaRouterMetrics::kHistogramUiAndroidDialogType[] =;
const char MediaRouterMetrics::kHistogramUiAndroidDialogAction[] =;
const char MediaRouterMetrics::kHistogramUiPermissionRejectedViewAction[] =;
const char MediaRouterMetrics::kHistogramUserPromptWhenLaunchingCast[] =;
const char MediaRouterMetrics::kHistogramPendingUserAuthLatency[] =;

// static
const base::TimeDelta MediaRouterMetrics::kDeviceCountMetricDelay =;

// static
void MediaRouterMetrics::RecordMediaRouterDialogActivationLocation(
    MediaRouterDialogActivationLocation activation_location) {}

// static
void MediaRouterMetrics::RecordCastDialogLoaded(const base::TimeDelta& delta) {}
// static
void MediaRouterMetrics::RecordGmcDialogLoaded(const base::TimeDelta& delta) {}

// static
void MediaRouterMetrics::RecordMediaRouterFileFormat(
    const media::container_names::MediaContainerName format) {}

// static
void MediaRouterMetrics::RecordMediaRouterFileSize(int64_t size) {}

// static
void MediaRouterMetrics::RecordPresentationUrlType(const GURL& url) {}

// static
void MediaRouterMetrics::RecordMediaSinkType(SinkIconType sink_icon_type) {}

// static
void MediaRouterMetrics::RecordMediaSinkTypeForGlobalMediaControls(
    SinkIconType sink_icon_type) {}

// static
void MediaRouterMetrics::RecordMediaSinkTypeForCastDialog(
    SinkIconType sink_icon_type) {}

// static
void MediaRouterMetrics::RecordDeviceCount(int device_count) {}

// static
void MediaRouterMetrics::RecordIconStateAtDialogOpen(bool is_pinned) {}

// static
void MediaRouterMetrics::RecordCreateRouteResultCode(
    mojom::RouteRequestResultCode result_code,
    std::optional<mojom::MediaRouteProviderId> provider_id) {}

// static
void MediaRouterMetrics::RecordJoinRouteResultCode(
    mojom::RouteRequestResultCode result_code,
    std::optional<mojom::MediaRouteProviderId> provider_id) {}

// static
void MediaRouterMetrics::RecordMediaRouteProviderTerminateRoute(
    mojom::RouteRequestResultCode result_code,
    std::optional<mojom::MediaRouteProviderId> provider_id) {}

// static
void MediaRouterMetrics::RecordMediaRouterAndroidDialogType(
    MediaRouterAndroidDialogType type) {}

// static
void MediaRouterMetrics::RecordMediaRouterAndroidDialogAction(
    MediaRouterAndroidDialogAction action) {}

// static
void MediaRouterMetrics::RecordMediaRouterUserPromptWhenLaunchingCast(
    MediaRouterUserPromptWhenLaunchingCast user_prompt) {}

// static
void MediaRouterMetrics::RecordMediaRouterPendingUserAuthLatency(
    const base::TimeDelta& delta) {}

void MediaRouterMetrics::RecordMediaRouterUiPermissionRejectedViewEvents(
    MediaRouterUiPermissionRejectedViewEvents event) {}

}  // namespace media_router