// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_METRICS_METRICS_LOG_STORE_H_ #define COMPONENTS_METRICS_METRICS_LOG_STORE_H_ #include <memory> #include <optional> #include <string> #include <string_view> #include "base/metrics/histogram_base.h" #include "base/sequence_checker.h" #include "components/metrics/log_store.h" #include "components/metrics/metrics_log.h" #include "components/metrics/metrics_logs_event_manager.h" #include "components/metrics/unsent_log_store.h" class PrefService; class PrefRegistrySimple; namespace metrics { class MetricsServiceClient; // A LogStore implementation for storing UMA logs. // This implementation keeps track of two types of logs, initial and ongoing, // each stored in UnsentLogStore. It prioritizes staging initial logs over // ongoing logs. // // An alternate log store can be set to persist ongoing logs. For example, this // can be used to separate user logs from device logs on Chrome OS. If set, all // ongoing logs will be written to this alternate log store. Ongoing logs from // the alternate log store will be prioritized over ongoing logs from the native // ongoing log store when logs are staged. If an alternate log store is bound, // then logs will be prioritized in the following order: initial, alternate // ongoing, native ongoing. class MetricsLogStore : public LogStore { … }; } // namespace metrics #endif // COMPONENTS_METRICS_METRICS_LOG_STORE_H_