| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 #include "chrome/browser/metrics/metrics_service.h" | 145 #include "chrome/browser/metrics/metrics_service.h" |
| 146 | 146 |
| 147 #include <algorithm> | 147 #include <algorithm> |
| 148 | 148 |
| 149 #include "base/bind.h" | 149 #include "base/bind.h" |
| 150 #include "base/callback.h" | 150 #include "base/callback.h" |
| 151 #include "base/command_line.h" | 151 #include "base/command_line.h" |
| 152 #include "base/guid.h" | 152 #include "base/guid.h" |
| 153 #include "base/md5.h" | 153 #include "base/md5.h" |
| 154 #include "base/metrics/histogram.h" | 154 #include "base/metrics/histogram.h" |
| 155 #include "base/metrics/statistics_recorder.h" |
| 155 #include "base/rand_util.h" | 156 #include "base/rand_util.h" |
| 156 #include "base/string_number_conversions.h" | 157 #include "base/string_number_conversions.h" |
| 157 #include "base/threading/platform_thread.h" | 158 #include "base/threading/platform_thread.h" |
| 158 #include "base/threading/thread.h" | 159 #include "base/threading/thread.h" |
| 159 #include "base/threading/thread_restrictions.h" | 160 #include "base/threading/thread_restrictions.h" |
| 160 #include "base/tracked_objects.h" | 161 #include "base/tracked_objects.h" |
| 161 #include "base/utf_string_conversions.h" | 162 #include "base/utf_string_conversions.h" |
| 162 #include "base/values.h" | 163 #include "base/values.h" |
| 163 #include "chrome/browser/autocomplete/autocomplete_log.h" | 164 #include "chrome/browser/autocomplete/autocomplete_log.h" |
| 164 #include "chrome/browser/bookmarks/bookmark_model.h" | 165 #include "chrome/browser/bookmarks/bookmark_model.h" |
| (...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 if (local_state) { | 1903 if (local_state) { |
| 1903 const PrefService::Preference* uma_pref = | 1904 const PrefService::Preference* uma_pref = |
| 1904 local_state->FindPreference(prefs::kMetricsReportingEnabled); | 1905 local_state->FindPreference(prefs::kMetricsReportingEnabled); |
| 1905 if (uma_pref) { | 1906 if (uma_pref) { |
| 1906 bool success = uma_pref->GetValue()->GetAsBoolean(&result); | 1907 bool success = uma_pref->GetValue()->GetAsBoolean(&result); |
| 1907 DCHECK(success); | 1908 DCHECK(success); |
| 1908 } | 1909 } |
| 1909 } | 1910 } |
| 1910 return result; | 1911 return result; |
| 1911 } | 1912 } |
| OLD | NEW |