Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Side by Side Diff: components/metrics/stability_metrics_helper.cc

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
8
7 #include <vector> 9 #include <vector>
8 10
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
11 #include "base/metrics/sparse_histogram.h" 13 #include "base/metrics/sparse_histogram.h"
12 #include "base/prefs/pref_registry_simple.h" 14 #include "base/prefs/pref_registry_simple.h"
13 #include "base/prefs/pref_service.h" 15 #include "base/prefs/pref_service.h"
16 #include "build/build_config.h"
14 #include "components/metrics/metrics_pref_names.h" 17 #include "components/metrics/metrics_pref_names.h"
15 #include "components/metrics/proto/system_profile.pb.h" 18 #include "components/metrics/proto/system_profile.pb.h"
16 19
17 #if defined(OS_WIN) 20 #if defined(OS_WIN)
18 #include <windows.h> // Needed for STATUS_* codes 21 #include <windows.h> // Needed for STATUS_* codes
19 #endif 22 #endif
20 23
21 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
22 #include "components/metrics/system_memory_stats_recorder.h" 25 #include "components/metrics/system_memory_stats_recorder.h"
23 #endif 26 #endif
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 IncrementPrefValue(prefs::kStabilityRendererFailedLaunchCount); 203 IncrementPrefValue(prefs::kStabilityRendererFailedLaunchCount);
201 } 204 }
202 } 205 }
203 206
204 void StabilityMetricsHelper::IncrementPrefValue(const char* path) { 207 void StabilityMetricsHelper::IncrementPrefValue(const char* path) {
205 int value = local_state_->GetInteger(path); 208 int value = local_state_->GetInteger(path);
206 local_state_->SetInteger(path, value + 1); 209 local_state_->SetInteger(path, value + 1);
207 } 210 }
208 211
209 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) { 212 void StabilityMetricsHelper::IncrementLongPrefsValue(const char* path) {
210 int64 value = local_state_->GetInt64(path); 213 int64_t value = local_state_->GetInt64(path);
211 local_state_->SetInt64(path, value + 1); 214 local_state_->SetInt64(path, value + 1);
212 } 215 }
213 216
214 void StabilityMetricsHelper::LogRendererHang() { 217 void StabilityMetricsHelper::LogRendererHang() {
215 IncrementPrefValue(prefs::kStabilityRendererHangCount); 218 IncrementPrefValue(prefs::kStabilityRendererHangCount);
216 } 219 }
217 220
218 } // namespace metrics 221 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/stability_metrics_helper.h ('k') | components/metrics/stability_metrics_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698