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 <memory> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/base64.h" | 14 #include "base/base64.h" |
15 #include "base/build_time.h" | 15 #include "base/build_time.h" |
16 #include "base/cpu.h" | 16 #include "base/cpu.h" |
17 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram_macros.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" |
27 #include "components/metrics/histogram_encoder.h" | 27 #include "components/metrics/histogram_encoder.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 DCHECK(!closed_); | 461 DCHECK(!closed_); |
462 closed_ = true; | 462 closed_ = true; |
463 } | 463 } |
464 | 464 |
465 void MetricsLog::GetEncodedLog(std::string* encoded_log) { | 465 void MetricsLog::GetEncodedLog(std::string* encoded_log) { |
466 DCHECK(closed_); | 466 DCHECK(closed_); |
467 uma_proto_.SerializeToString(encoded_log); | 467 uma_proto_.SerializeToString(encoded_log); |
468 } | 468 } |
469 | 469 |
470 } // namespace metrics | 470 } // namespace metrics |
OLD | NEW |