// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_METRICS_PERSISTENT_HISTOGRAM_STORAGE_H_ #define BASE_METRICS_PERSISTENT_HISTOGRAM_STORAGE_H_ #include <string_view> #include "base/base_export.h" #include "base/files/file_path.h" namespace base { // This class creates a fixed sized persistent memory to allow histograms to be // stored in it. When a PersistentHistogramStorage is destructed, histograms // recorded during its lifetime are persisted in the directory // |storage_base_dir_|/|allocator_name| (see the ctor for allocator_name). // Histograms are not persisted if the storage directory does not exist on // destruction. PersistentHistogramStorage should be instantiated as early as // possible in the process lifetime and should never be instantiated again. // Persisted histograms will eventually be reported by Chrome. class BASE_EXPORT PersistentHistogramStorage { … }; } // namespace base #endif // BASE_METRICS_PERSISTENT_HISTOGRAM_STORAGE_H_