blob: 34a6f5926e5a9eaf0679cace2b0d716a05ecf3d8 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_METRICS_UNSENT_LOG_STORE_METRICS_IMPL_H_
#define COMPONENTS_METRICS_UNSENT_LOG_STORE_METRICS_IMPL_H_
#include "components/metrics/unsent_log_store_metrics.h"
namespace metrics {
// Implementation for recording metrics from UnsentLogStore.
class UnsentLogStoreMetricsImpl : public UnsentLogStoreMetrics {
public:
// TODO(crbug/1265440): Refactor to use MetricsLogStore::StorageLimits.
UnsentLogStoreMetricsImpl() = default;
UnsentLogStoreMetricsImpl(const UnsentLogStoreMetricsImpl&) = delete;
UnsentLogStoreMetricsImpl& operator=(const UnsentLogStoreMetricsImpl&) =
delete;
~UnsentLogStoreMetricsImpl() override = default;
// UnsentLogStoreMetrics:
void RecordCompressionRatio(
size_t compressed_size, size_t original_size) override;
void RecordDroppedLogSize(size_t size) override;
void RecordDroppedLogsNum(int dropped_logs_num) override;
void RecordLastUnsentLogMetadataMetrics(int unsent_samples_count,
int sent_samples_count,
int persisted_size_in_kb) override;
};
} // namespace metrics
#endif // COMPONENTS_METRICS_UNSENT_LOG_STORE_METRICS_IMPL_H_