// Copyright 2014 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_CLEAN_EXIT_BEACON_H_ #define COMPONENTS_METRICS_CLEAN_EXIT_BEACON_H_ #include <optional> #include <string> #include "base/files/file_path.h" #include "base/memory/raw_ptr.h" #include "base/time/time.h" #include "base/values.h" #include "build/build_config.h" class PrefRegistrySimple; class PrefService; namespace metrics { // The name of the beacon file, which is relative to the user data directory // and used to store the CleanExitBeacon value and the variations crash streak. extern const base::FilePath::CharType kCleanExitBeaconFilename[]; // Captures all possible beacon value permutations for two distinct beacons. // Exposed for testing. // // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class CleanExitBeaconConsistency { … }; // Denotes the state of the beacon file. Exposed for testing. // // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class BeaconFileState { … }; // Reads and updates a beacon used to detect whether the previous browser // process exited cleanly. class CleanExitBeacon { … }; } // namespace metrics #endif // COMPONENTS_METRICS_CLEAN_EXIT_BEACON_H_