account_key_failure.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_QUICK_PAIR_COMMON_ACCOUNT_KEY_FAILURE_H_
  5. #define ASH_QUICK_PAIR_COMMON_ACCOUNT_KEY_FAILURE_H_
  6. #include <ostream>
  7. #include "base/component_export.h"
  8. namespace ash {
  9. namespace quick_pair {
  10. // These values are persisted to logs. Entries should not be renumbered and
  11. // numeric values should never be reused. This enum should be kept in sync with
  12. // the FastPairAccountKeyFailure enum in src/tools/metrics/histograms/enums.xml.
  13. enum class AccountKeyFailure {
  14. // Failed to find the Account Key GATT characteristic.
  15. kAccountKeyCharacteristicDiscovery = 0,
  16. // Failed to write to the Account Key GATT characteristic.
  17. kAccountKeyCharacteristicWrite = 1,
  18. kMaxValue = kAccountKeyCharacteristicWrite,
  19. };
  20. COMPONENT_EXPORT(QUICK_PAIR_COMMON)
  21. std::ostream& operator<<(std::ostream& stream, AccountKeyFailure protocol);
  22. } // namespace quick_pair
  23. } // namespace ash
  24. #endif // ASH_QUICK_PAIR_COMMON_ACCOUNT_KEY_FAILURE_H_