Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 //------------------------------------------------------------------------------ | 5 //------------------------------------------------------------------------------ |
| 6 // Description of the life cycle of a instance of MetricsService. | 6 // Description of the life cycle of a instance of MetricsService. |
| 7 // | 7 // |
| 8 // OVERVIEW | 8 // OVERVIEW |
| 9 // | 9 // |
| 10 // A MetricsService instance is typically created at application startup. It | 10 // A MetricsService instance is typically created at application startup. It |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 #include "chrome/browser/metrics/metrics_service.h" | 150 #include "chrome/browser/metrics/metrics_service.h" |
| 151 | 151 |
| 152 #include <algorithm> | 152 #include <algorithm> |
| 153 | 153 |
| 154 #include "base/bind.h" | 154 #include "base/bind.h" |
| 155 #include "base/callback.h" | 155 #include "base/callback.h" |
| 156 #include "base/command_line.h" | 156 #include "base/command_line.h" |
| 157 #include "base/guid.h" | 157 #include "base/guid.h" |
| 158 #include "base/md5.h" | 158 #include "base/md5.h" |
| 159 #include "base/metrics/histogram.h" | 159 #include "base/metrics/histogram.h" |
| 160 #include "base/metrics/sparse_histogram.h" | |
|
Ilya Sherman
2013/02/21 05:36:06
nit: Doesn't seem like this is needed.
kaiwang
2013/02/27 04:39:42
Done.
| |
| 160 #include "base/metrics/statistics_recorder.h" | 161 #include "base/metrics/statistics_recorder.h" |
| 161 #include "base/rand_util.h" | 162 #include "base/rand_util.h" |
| 162 #include "base/string_number_conversions.h" | 163 #include "base/string_number_conversions.h" |
| 163 #include "base/threading/platform_thread.h" | 164 #include "base/threading/platform_thread.h" |
| 164 #include "base/threading/thread.h" | 165 #include "base/threading/thread.h" |
| 165 #include "base/threading/thread_restrictions.h" | 166 #include "base/threading/thread_restrictions.h" |
| 166 #include "base/tracked_objects.h" | 167 #include "base/tracked_objects.h" |
| 167 #include "base/utf_string_conversions.h" | 168 #include "base/utf_string_conversions.h" |
| 168 #include "base/values.h" | 169 #include "base/values.h" |
| 169 #include "chrome/browser/autocomplete/autocomplete_log.h" | 170 #include "chrome/browser/autocomplete/autocomplete_log.h" |
| (...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1942 if (local_state) { | 1943 if (local_state) { |
| 1943 const PrefService::Preference* uma_pref = | 1944 const PrefService::Preference* uma_pref = |
| 1944 local_state->FindPreference(prefs::kMetricsReportingEnabled); | 1945 local_state->FindPreference(prefs::kMetricsReportingEnabled); |
| 1945 if (uma_pref) { | 1946 if (uma_pref) { |
| 1946 bool success = uma_pref->GetValue()->GetAsBoolean(&result); | 1947 bool success = uma_pref->GetValue()->GetAsBoolean(&result); |
| 1947 DCHECK(success); | 1948 DCHECK(success); |
| 1948 } | 1949 } |
| 1949 } | 1950 } |
| 1950 return result; | 1951 return result; |
| 1951 } | 1952 } |
| OLD | NEW |