chromium/components/device_signals/core/browser/metrics_utils.cc

// Copyright 2022 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/device_signals/core/browser/metrics_utils.h"

#include "base/metrics/histogram_functions.h"
#include "base/strings/stringprintf.h"
#include "components/device_signals/core/browser/signals_types.h"
#include "components/device_signals/core/browser/user_permission_service.h"

namespace device_signals {

namespace {

constexpr int kMaxSampleValue =;

constexpr char kUserPermissionHistogram[] =;
constexpr char kCollectionRequestHistogram[] =;
constexpr char kCollectionSuccessHistogram[] =;
constexpr char kCollectionFailureHistogram[] =;

constexpr char kCollectionSuccessLatencyHistogramFormat[] =;
constexpr char kCollectionFailureLatencyHistogramFormat[] =;
constexpr char kCollectionRequestItemsSizeHistogramFormat[] =;
constexpr char kCollectionItemsSizeDeltaHistogramFormat[] =;
constexpr char kCollectionSuccessSizeHistogramFormat[] =;
constexpr char kCollectionSpecificFailureHistogramFormat[] =;

std::string GetHistogramVariant(SignalName signal_name) {}

std::string GetErrorHistogramVariant(SignalName signal_name,
                                     bool is_top_level_error) {}

}  // namespace

void LogUserPermissionChecked(UserPermission permission) {}

void LogSignalCollectionRequested(SignalName signal_name) {}

void LogSignalCollectionRequestedWithItems(SignalName signal_name,
                                           size_t number_of_items) {}

void LogSignalCollectionFailed(SignalName signal_name,
                               base::TimeTicks start_time,
                               SignalCollectionError error,
                               bool is_top_level_error) {}

void LogSignalCollectionSucceeded(SignalName signal_name,
                                  base::TimeTicks start_time,
                                  std::optional<size_t> signal_collection_size,
                                  std::optional<size_t> signal_request_size) {}

void LogCrowdStrikeParsingError(SignalsParsingError error) {}

}  // namespace device_signals