page_end_reason.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright 2019 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_PAGE_LOAD_METRICS_COMMON_PAGE_END_REASON_H_
  5. #define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_END_REASON_H_
  6. namespace page_load_metrics {
  7. // This enum represents how a page load ends. If the action occurs before the
  8. // page load finishes (or reaches some point like first paint), then we consider
  9. // the load to be aborted.
  10. //
  11. // These values are persisted to logs and the history DB. Entries should not be
  12. // renumbered and numeric values should never be reused. For any additions, also
  13. // update the corresponding PageEndReason enum in enums.xml.
  14. enum PageEndReason {
  15. // Page lifetime has not yet ended (page is still active). Pages that
  16. // become hidden are logged in END_HIDDEN, so we expect low numbers in this
  17. // bucket from the end of May 2020.
  18. END_NONE = 0,
  19. // The page was reloaded, possibly by the user.
  20. END_RELOAD = 1,
  21. // The page was navigated away from, via a back or forward navigation.
  22. END_FORWARD_BACK = 2,
  23. // The navigation is replaced with a navigation with the qualifier
  24. // ui::PAGE_TRANSITION_CLIENT_REDIRECT, which is caused by Javascript, or the
  25. // meta refresh tag.
  26. END_CLIENT_REDIRECT = 3,
  27. // If the page load is replaced by a new navigation. This includes link
  28. // clicks, typing in the omnibox (not a reload), and form submissions.
  29. END_NEW_NAVIGATION = 4,
  30. // The page load was stopped (e.g. the user presses the stop X button).
  31. END_STOP = 5,
  32. // Page load ended due to closing the tab or browser.
  33. END_CLOSE = 6,
  34. // The provisional load for this page load failed before committing.
  35. END_PROVISIONAL_LOAD_FAILED = 7,
  36. // The render process hosting the page terminated unexpectedly.
  37. END_RENDER_PROCESS_GONE = 8,
  38. // We don't know why the page load ended. This is the value we assign to a
  39. // terminated provisional load if the only signal we get is the load finished
  40. // without committing, either without error or with net::ERR_ABORTED.
  41. END_OTHER = 9,
  42. // The page became hidden but is still active. Added end of May 2020 for
  43. // Navigation.PageEndReason2. Deprecated Jan 2021 with
  44. // Navigation.PageEndReason3.
  45. END_HIDDEN = 10,
  46. // The page load has not yet ended but we need to flush the metrics because
  47. // the app has entered the background.
  48. END_APP_ENTER_BACKGROUND = 11,
  49. PAGE_END_REASON_COUNT
  50. };
  51. } // namespace page_load_metrics
  52. #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_END_REASON_H_