Always record for tests and whitelist expired histograms through field trial.

Expired histogram logic is disabled by default and is enabled by field trial.
The field trial will enable it for all the users. This is done so that
unit tests don't use expired histogram logic otherwise unit tests can fail
unexpectedly when histograms become expired.

The same field trial also has "whitelist" param that will contain names of
expired histograms that should be recorded.

Bug: 764030
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.linux:linux_mojo;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I60bf53d0a4a4cf126873e150b2b3ee6645e7d173
Reviewed-on: https://chromium-review.googlesource.com/1064726
Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#561216}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f3ecb14502b14c35e4d43a4a0ee88f7d4f5fbe69
6 files changed
tree: f4e86df0760b99e085a302a35bce77d3c18af4ab
  1. BUILD.gn
  2. DEPS
  3. OWNERS
  4. README
  5. call_stack_profile_collector.cc
  6. call_stack_profile_collector.h
  7. call_stack_profile_metrics_provider.cc
  8. call_stack_profile_metrics_provider.h
  9. call_stack_profile_metrics_provider_unittest.cc
  10. call_stack_profile_params.h
  11. child_call_stack_profile_collector.cc
  12. child_call_stack_profile_collector.h
  13. child_call_stack_profile_collector_unittest.cc
  14. clean_exit_beacon.cc
  15. clean_exit_beacon.h
  16. client_info.cc
  17. client_info.h
  18. cloned_install_detector.cc
  19. cloned_install_detector.h
  20. cloned_install_detector_unittest.cc
  21. component_metrics_provider.cc
  22. component_metrics_provider.h
  23. component_metrics_provider_unittest.cc
  24. daily_event.cc
  25. daily_event.h
  26. daily_event_unittest.cc
  27. data_use_tracker.cc
  28. data_use_tracker.h
  29. data_use_tracker_unittest.cc
  30. delegating_provider.cc
  31. delegating_provider.h
  32. drive_metrics_provider.cc
  33. drive_metrics_provider.h
  34. drive_metrics_provider_android.cc
  35. drive_metrics_provider_fuchsia.cc
  36. drive_metrics_provider_ios.mm
  37. drive_metrics_provider_linux.cc
  38. drive_metrics_provider_mac.mm
  39. drive_metrics_provider_unittest.cc
  40. drive_metrics_provider_win.cc
  41. enabled_state_provider.cc
  42. enabled_state_provider.h
  43. environment_recorder.cc
  44. environment_recorder.h
  45. environment_recorder_unittest.cc
  46. execution_phase.cc
  47. execution_phase.h
  48. expired_histogram_util.cc
  49. expired_histogram_util.h
  50. expired_histograms_checker.cc
  51. expired_histograms_checker.h
  52. expired_histograms_checker_unittest.cc
  53. field_trials_provider.cc
  54. field_trials_provider.h
  55. field_trials_provider_unittest.cc
  56. file_metrics_provider.cc
  57. file_metrics_provider.h
  58. file_metrics_provider_unittest.cc
  59. generate_expired_histograms_array.gni
  60. gpu/
  61. histogram_encoder.cc
  62. histogram_encoder.h
  63. histogram_encoder_unittest.cc
  64. log_decoder.cc
  65. log_decoder.h
  66. log_store.h
  67. machine_id_provider.h
  68. machine_id_provider_stub.cc
  69. machine_id_provider_win.cc
  70. machine_id_provider_win_unittest.cc
  71. metrics_log.cc
  72. metrics_log.h
  73. metrics_log_manager.cc
  74. metrics_log_manager.h
  75. metrics_log_manager_unittest.cc
  76. metrics_log_store.cc
  77. metrics_log_store.h
  78. metrics_log_store_unittest.cc
  79. metrics_log_unittest.cc
  80. metrics_log_uploader.h
  81. metrics_pref_names.cc
  82. metrics_pref_names.h
  83. metrics_provider.cc
  84. metrics_provider.h
  85. metrics_reporting_default_state.cc
  86. metrics_reporting_default_state.h
  87. metrics_reporting_service.cc
  88. metrics_reporting_service.h
  89. metrics_rotation_scheduler.cc
  90. metrics_rotation_scheduler.h
  91. metrics_scheduler.cc
  92. metrics_scheduler.h
  93. metrics_service.cc
  94. metrics_service.h
  95. metrics_service_accessor.cc
  96. metrics_service_accessor.h
  97. metrics_service_client.cc
  98. metrics_service_client.h
  99. metrics_service_unittest.cc
  100. metrics_state_manager.cc
  101. metrics_state_manager.h
  102. metrics_state_manager_unittest.cc
  103. metrics_switches.cc
  104. metrics_switches.h
  105. metrics_upload_scheduler.cc
  106. metrics_upload_scheduler.h
  107. net/
  108. persisted_logs.cc
  109. persisted_logs.h
  110. persisted_logs_metrics.h
  111. persisted_logs_metrics_impl.cc
  112. persisted_logs_metrics_impl.h
  113. persisted_logs_unittest.cc
  114. persistent_system_profile.cc
  115. persistent_system_profile.h
  116. persistent_system_profile_unittest.cc
  117. public/
  118. reporting_service.cc
  119. reporting_service.h
  120. reporting_service_unittest.cc
  121. serialization/
  122. single_sample_metrics.cc
  123. single_sample_metrics.h
  124. single_sample_metrics_factory_impl.cc
  125. single_sample_metrics_factory_impl.h
  126. single_sample_metrics_factory_impl_unittest.cc
  127. stability_metrics_helper.cc
  128. stability_metrics_helper.h
  129. stability_metrics_helper_unittest.cc
  130. stability_metrics_provider.cc
  131. stability_metrics_provider.h
  132. stability_metrics_provider_unittest.cc
  133. system_memory_stats_recorder.h
  134. system_memory_stats_recorder_linux.cc
  135. system_memory_stats_recorder_win.cc
  136. system_session_analyzer_win.cc
  137. system_session_analyzer_win.h
  138. system_session_analyzer_win_unittest.cc
  139. test_enabled_state_provider.cc
  140. test_enabled_state_provider.h
  141. test_metrics_log_uploader.cc
  142. test_metrics_log_uploader.h
  143. test_metrics_provider.cc
  144. test_metrics_provider.h
  145. test_metrics_service_client.cc
  146. test_metrics_service_client.h
  147. ui/
  148. url_constants.cc
  149. url_constants.h
  150. version_utils.cc
  151. version_utils.h