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_macros.h" |
13 #include "base/metrics/sparse_histogram.h" | 13 #include "base/metrics/sparse_histogram.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "components/metrics/metrics_pref_names.h" | 15 #include "components/metrics/metrics_pref_names.h" |
16 #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" | 17 #include "components/prefs/pref_registry_simple.h" |
18 #include "components/prefs/pref_service.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 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) { | 257 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) { |
258 int64_t value = local_state_->GetInt64(path); | 258 int64_t value = local_state_->GetInt64(path); |
259 local_state_->SetInt64(path, value + 1); | 259 local_state_->SetInt64(path, value + 1); |
260 } | 260 } |
261 | 261 |
262 void StabilityMetricsHelper::LogRendererHang() { | 262 void StabilityMetricsHelper::LogRendererHang() { |
263 IncrementPrefValue(prefs::kStabilityRendererHangCount); | 263 IncrementPrefValue(prefs::kStabilityRendererHangCount); |
264 } | 264 } |
265 | 265 |
266 } // namespace metrics | 266 } // namespace metrics |
OLD | NEW |