| 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 "chrome/browser/metrics/android_metrics_provider.h" | 5 #include "chrome/browser/metrics/android_metrics_provider.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/prefs/pref_registry_simple.h" | |
| 9 #include "base/prefs/pref_service.h" | |
| 10 #include "base/prefs/scoped_user_pref_update.h" | |
| 11 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
| 12 #include "base/values.h" | 9 #include "base/values.h" |
| 13 #include "chrome/browser/android/feature_utilities.h" | 10 #include "chrome/browser/android/feature_utilities.h" |
| 14 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "components/prefs/pref_registry_simple.h" |
| 13 #include "components/prefs/pref_service.h" |
| 14 #include "components/prefs/scoped_user_pref_update.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // Increments a particular entry in the ListValue. | 18 // Increments a particular entry in the ListValue. |
| 19 void IncrementListValue(base::ListValue* counts, int index) { | 19 void IncrementListValue(base::ListValue* counts, int index) { |
| 20 int current_count = 0; | 20 int current_count = 0; |
| 21 counts->GetInteger(index, ¤t_count); | 21 counts->GetInteger(index, ¤t_count); |
| 22 counts->Set(index, new base::FundamentalValue(current_count + 1)); | 22 counts->Set(index, new base::FundamentalValue(current_count + 1)); |
| 23 } | 23 } |
| 24 | 24 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 for (int count = 0; count < crash_count; ++count) { | 154 for (int count = 0; count < crash_count; ++count) { |
| 155 UMA_STABILITY_HISTOGRAM_ENUMERATION("Chrome.Android.Activity.CrashCounts", | 155 UMA_STABILITY_HISTOGRAM_ENUMERATION("Chrome.Android.Activity.CrashCounts", |
| 156 activity_type, | 156 activity_type, |
| 157 ActivityTypeIds::ACTIVITY_MAX_VALUE); | 157 ActivityTypeIds::ACTIVITY_MAX_VALUE); |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 | 160 |
| 161 launch_counts->Clear(); | 161 launch_counts->Clear(); |
| 162 crash_counts->Clear(); | 162 crash_counts->Clear(); |
| 163 } | 163 } |
| OLD | NEW |