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_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/metrics/sparse_histogram.h" | 13 #include "base/metrics/sparse_histogram.h" |
| 14 #include "base/metrics/user_metrics.h" |
14 #include "build/build_config.h" | 15 #include "build/build_config.h" |
15 #include "components/metrics/metrics_pref_names.h" | 16 #include "components/metrics/metrics_pref_names.h" |
16 #include "components/metrics/proto/system_profile.pb.h" | 17 #include "components/metrics/proto/system_profile.pb.h" |
17 #include "components/prefs/pref_registry_simple.h" | 18 #include "components/prefs/pref_registry_simple.h" |
18 #include "components/prefs/pref_service.h" | 19 #include "components/prefs/pref_service.h" |
19 | 20 |
20 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
21 #include <windows.h> // Needed for STATUS_* codes | 22 #include <windows.h> // Needed for STATUS_* codes |
22 #endif | 23 #endif |
23 | 24 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) { | 258 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) { |
258 int64_t value = local_state_->GetInt64(path); | 259 int64_t value = local_state_->GetInt64(path); |
259 local_state_->SetInt64(path, value + 1); | 260 local_state_->SetInt64(path, value + 1); |
260 } | 261 } |
261 | 262 |
262 void StabilityMetricsHelper::LogRendererHang() { | 263 void StabilityMetricsHelper::LogRendererHang() { |
263 IncrementPrefValue(prefs::kStabilityRendererHangCount); | 264 IncrementPrefValue(prefs::kStabilityRendererHangCount); |
264 } | 265 } |
265 | 266 |
266 } // namespace metrics | 267 } // namespace metrics |
OLD | NEW |