omnibox_https_upgrade_metrics.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2022 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 COMPONENTS_SECURITY_INTERSTITIALS_CORE_OMNIBOX_HTTPS_UPGRADE_METRICS_H_
  5. #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_OMNIBOX_HTTPS_UPGRADE_METRICS_H_
  6. namespace security_interstitials::omnibox_https_upgrades {
  7. extern const char kEventHistogram[];
  8. // These values are persisted to logs. Entries should not be renumbered and
  9. // numeric values should never be reused.
  10. enum class Event {
  11. kNone = 0,
  12. // Started the load of an upgraded HTTPS URL.
  13. kHttpsLoadStarted,
  14. // Successfully finished loading the upgraded HTTPS URL.
  15. kHttpsLoadSucceeded,
  16. // Failed to load the upgraded HTTPS URL because of a cert error, fell back
  17. // to the HTTP URL.
  18. kHttpsLoadFailedWithCertError,
  19. // Failed to load the upgraded HTTPS URL because of a net error, fell back
  20. // to the HTTP URL.
  21. kHttpsLoadFailedWithNetError,
  22. // Failed to load the upgraded HTTPS URL within the timeout window, fell
  23. // back to the HTTP URL.
  24. kHttpsLoadTimedOut,
  25. // Received a redirect. This doesn't necessarily imply that the HTTPS load
  26. // succeeded or failed.
  27. kRedirected,
  28. kMaxValue = kRedirected,
  29. };
  30. } // namespace security_interstitials::omnibox_https_upgrades
  31. #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_OMNIBOX_HTTPS_UPGRADE_METRICS_H_