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 #include "components/metrics/metrics_log.h" | 5 #include "components/metrics/metrics_log.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/base64.h" | 14 #include "base/base64.h" |
14 #include "base/build_time.h" | 15 #include "base/build_time.h" |
15 #include "base/cpu.h" | 16 #include "base/cpu.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
18 #include "base/metrics/histogram_samples.h" | 18 #include "base/metrics/histogram_samples.h" |
19 #include "base/metrics/metrics_hashes.h" | 19 #include "base/metrics/metrics_hashes.h" |
20 #include "base/sha1.h" | 20 #include "base/sha1.h" |
21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
24 #include "base/sys_info.h" | 24 #include "base/sys_info.h" |
25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 DCHECK(!closed_); | 414 DCHECK(!closed_); |
415 closed_ = true; | 415 closed_ = true; |
416 } | 416 } |
417 | 417 |
418 void MetricsLog::GetEncodedLog(std::string* encoded_log) { | 418 void MetricsLog::GetEncodedLog(std::string* encoded_log) { |
419 DCHECK(closed_); | 419 DCHECK(closed_); |
420 uma_proto_.SerializeToString(encoded_log); | 420 uma_proto_.SerializeToString(encoded_log); |
421 } | 421 } |
422 | 422 |
423 } // namespace metrics | 423 } // namespace metrics |
OLD | NEW |