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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 #include <algorithm> | 128 #include <algorithm> |
129 #include <utility> | 129 #include <utility> |
130 | 130 |
131 #include "base/bind.h" | 131 #include "base/bind.h" |
132 #include "base/callback.h" | 132 #include "base/callback.h" |
133 #include "base/location.h" | 133 #include "base/location.h" |
134 #include "base/metrics/histogram_base.h" | 134 #include "base/metrics/histogram_base.h" |
135 #include "base/metrics/histogram_macros.h" | 135 #include "base/metrics/histogram_macros.h" |
136 #include "base/metrics/histogram_samples.h" | 136 #include "base/metrics/histogram_samples.h" |
137 #include "base/metrics/persistent_histogram_allocator.h" | 137 #include "base/metrics/persistent_histogram_allocator.h" |
| 138 #include "base/metrics/persistent_memory_allocator.h" |
138 #include "base/metrics/sparse_histogram.h" | 139 #include "base/metrics/sparse_histogram.h" |
139 #include "base/metrics/statistics_recorder.h" | 140 #include "base/metrics/statistics_recorder.h" |
140 #include "base/rand_util.h" | 141 #include "base/rand_util.h" |
141 #include "base/single_thread_task_runner.h" | 142 #include "base/single_thread_task_runner.h" |
142 #include "base/strings/string_number_conversions.h" | 143 #include "base/strings/string_number_conversions.h" |
143 #include "base/strings/utf_string_conversions.h" | 144 #include "base/strings/utf_string_conversions.h" |
144 #include "base/thread_task_runner_handle.h" | 145 #include "base/thread_task_runner_handle.h" |
145 #include "base/threading/platform_thread.h" | 146 #include "base/threading/platform_thread.h" |
146 #include "base/threading/thread.h" | 147 #include "base/threading/thread.h" |
147 #include "base/threading/thread_restrictions.h" | 148 #include "base/threading/thread_restrictions.h" |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 base::Time::Now().ToTimeT()); | 1162 base::Time::Now().ToTimeT()); |
1162 } | 1163 } |
1163 | 1164 |
1164 void MetricsService::SkipAndDiscardUpload() { | 1165 void MetricsService::SkipAndDiscardUpload() { |
1165 log_manager_.DiscardStagedLog(); | 1166 log_manager_.DiscardStagedLog(); |
1166 scheduler_->UploadCancelled(); | 1167 scheduler_->UploadCancelled(); |
1167 log_upload_in_progress_ = false; | 1168 log_upload_in_progress_ = false; |
1168 } | 1169 } |
1169 | 1170 |
1170 } // namespace metrics | 1171 } // namespace metrics |
OLD | NEW |