| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 //------------------------------------------------------------------------------ | 5 //------------------------------------------------------------------------------ |
| 6 // Description of the life cycle of a instance of MetricsService. | 6 // Description of the life cycle of a instance of MetricsService. |
| 7 // | 7 // |
| 8 // OVERVIEW | 8 // OVERVIEW |
| 9 // | 9 // |
| 10 // A MetricsService instance is typically created at application startup. It is | 10 // A MetricsService instance is typically created at application startup. It is |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 #include "base/metrics/histogram_base.h" | 136 #include "base/metrics/histogram_base.h" |
| 137 #include "base/metrics/histogram_macros.h" | 137 #include "base/metrics/histogram_macros.h" |
| 138 #include "base/metrics/histogram_samples.h" | 138 #include "base/metrics/histogram_samples.h" |
| 139 #include "base/metrics/persistent_histogram_allocator.h" | 139 #include "base/metrics/persistent_histogram_allocator.h" |
| 140 #include "base/metrics/sparse_histogram.h" | 140 #include "base/metrics/sparse_histogram.h" |
| 141 #include "base/metrics/statistics_recorder.h" | 141 #include "base/metrics/statistics_recorder.h" |
| 142 #include "base/rand_util.h" | 142 #include "base/rand_util.h" |
| 143 #include "base/single_thread_task_runner.h" | 143 #include "base/single_thread_task_runner.h" |
| 144 #include "base/strings/string_number_conversions.h" | 144 #include "base/strings/string_number_conversions.h" |
| 145 #include "base/strings/utf_string_conversions.h" | 145 #include "base/strings/utf_string_conversions.h" |
| 146 #include "base/thread_task_runner_handle.h" | |
| 147 #include "base/threading/platform_thread.h" | 146 #include "base/threading/platform_thread.h" |
| 148 #include "base/threading/thread.h" | 147 #include "base/threading/thread.h" |
| 149 #include "base/threading/thread_restrictions.h" | 148 #include "base/threading/thread_restrictions.h" |
| 149 #include "base/threading/thread_task_runner_handle.h" |
| 150 #include "base/time/time.h" | 150 #include "base/time/time.h" |
| 151 #include "base/tracked_objects.h" | 151 #include "base/tracked_objects.h" |
| 152 #include "base/values.h" | 152 #include "base/values.h" |
| 153 #include "build/build_config.h" | 153 #include "build/build_config.h" |
| 154 #include "components/metrics/data_use_tracker.h" | 154 #include "components/metrics/data_use_tracker.h" |
| 155 #include "components/metrics/metrics_log.h" | 155 #include "components/metrics/metrics_log.h" |
| 156 #include "components/metrics/metrics_log_manager.h" | 156 #include "components/metrics/metrics_log_manager.h" |
| 157 #include "components/metrics/metrics_log_uploader.h" | 157 #include "components/metrics/metrics_log_uploader.h" |
| 158 #include "components/metrics/metrics_pref_names.h" | 158 #include "components/metrics/metrics_pref_names.h" |
| 159 #include "components/metrics/metrics_reporting_scheduler.h" | 159 #include "components/metrics/metrics_reporting_scheduler.h" |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 base::Time::Now().ToTimeT()); | 1191 base::Time::Now().ToTimeT()); |
| 1192 } | 1192 } |
| 1193 | 1193 |
| 1194 void MetricsService::SkipAndDiscardUpload() { | 1194 void MetricsService::SkipAndDiscardUpload() { |
| 1195 log_manager_.DiscardStagedLog(); | 1195 log_manager_.DiscardStagedLog(); |
| 1196 scheduler_->UploadCancelled(); | 1196 scheduler_->UploadCancelled(); |
| 1197 log_upload_in_progress_ = false; | 1197 log_upload_in_progress_ = false; |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 } // namespace metrics | 1200 } // namespace metrics |
| OLD | NEW |