OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/prefs/pref_metrics_service.h" | 5 #include "chrome/browser/prefs/pref_metrics_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 histogram_name, | 205 histogram_name, |
206 1, | 206 1, |
207 boundary_value, | 207 boundary_value, |
208 boundary_value + 1, | 208 boundary_value + 1, |
209 base::HistogramBase::kUmaTargetedHistogramFlag); | 209 base::HistogramBase::kUmaTargetedHistogramFlag); |
210 histogram->Add(integer_value); | 210 histogram->Add(integer_value); |
211 } | 211 } |
212 | 212 |
213 // static | 213 // static |
214 PrefMetricsService::Factory* PrefMetricsService::Factory::GetInstance() { | 214 PrefMetricsService::Factory* PrefMetricsService::Factory::GetInstance() { |
215 return Singleton<PrefMetricsService::Factory>::get(); | 215 return base::Singleton<PrefMetricsService::Factory>::get(); |
216 } | 216 } |
217 | 217 |
218 // static | 218 // static |
219 PrefMetricsService* PrefMetricsService::Factory::GetForProfile( | 219 PrefMetricsService* PrefMetricsService::Factory::GetForProfile( |
220 Profile* profile) { | 220 Profile* profile) { |
221 return static_cast<PrefMetricsService*>( | 221 return static_cast<PrefMetricsService*>( |
222 GetInstance()->GetServiceForBrowserContext(profile, true)); | 222 GetInstance()->GetServiceForBrowserContext(profile, true)); |
223 } | 223 } |
224 | 224 |
225 PrefMetricsService::Factory::Factory() | 225 PrefMetricsService::Factory::Factory() |
(...skipping 16 matching lines...) Expand all Loading... |
242 } | 242 } |
243 | 243 |
244 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const { | 244 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const { |
245 return false; | 245 return false; |
246 } | 246 } |
247 | 247 |
248 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse( | 248 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse( |
249 content::BrowserContext* context) const { | 249 content::BrowserContext* context) const { |
250 return chrome::GetBrowserContextRedirectedInIncognito(context); | 250 return chrome::GetBrowserContextRedirectedInIncognito(context); |
251 } | 251 } |
OLD | NEW |