OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/stability_metrics_helper.h" | 5 #include "components/metrics/stability_metrics_helper.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/metrics/sparse_histogram.h" | 13 #include "base/metrics/sparse_histogram.h" |
14 #include "base/prefs/pref_registry_simple.h" | |
15 #include "base/prefs/pref_service.h" | |
16 #include "build/build_config.h" | 14 #include "build/build_config.h" |
17 #include "components/metrics/metrics_pref_names.h" | 15 #include "components/metrics/metrics_pref_names.h" |
18 #include "components/metrics/proto/system_profile.pb.h" | 16 #include "components/metrics/proto/system_profile.pb.h" |
| 17 #include "components/prefs/pref_registry_simple.h" |
| 18 #include "components/prefs/pref_service.h" |
19 | 19 |
20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
21 #include <windows.h> // Needed for STATUS_* codes | 21 #include <windows.h> // Needed for STATUS_* codes |
22 #endif | 22 #endif |
23 | 23 |
24 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
25 #include "components/metrics/system_memory_stats_recorder.h" | 25 #include "components/metrics/system_memory_stats_recorder.h" |
26 #endif | 26 #endif |
27 | 27 |
28 namespace metrics { | 28 namespace metrics { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) { | 212 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) { |
213 int64_t value = local_state_->GetInt64(path); | 213 int64_t value = local_state_->GetInt64(path); |
214 local_state_->SetInt64(path, value + 1); | 214 local_state_->SetInt64(path, value + 1); |
215 } | 215 } |
216 | 216 |
217 void StabilityMetricsHelper::LogRendererHang() { | 217 void StabilityMetricsHelper::LogRendererHang() { |
218 IncrementPrefValue(prefs::kStabilityRendererHangCount); | 218 IncrementPrefValue(prefs::kStabilityRendererHangCount); |
219 } | 219 } |
220 | 220 |
221 } // namespace metrics | 221 } // namespace metrics |
OLD | NEW |