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/mac/mac_startup_profiler.h" | 5 #include "chrome/browser/mac/mac_startup_profiler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "components/startup_metric_utils/browser/startup_metric_utils.h" | 9 #include "components/startup_metric_utils/browser/startup_metric_utils.h" |
10 | 10 |
11 // static | 11 // static |
12 MacStartupProfiler* MacStartupProfiler::GetInstance() { | 12 MacStartupProfiler* MacStartupProfiler::GetInstance() { |
13 return base::Singleton<MacStartupProfiler>::get(); | 13 return base::Singleton<MacStartupProfiler>::get(); |
14 } | 14 } |
15 | 15 |
16 MacStartupProfiler::MacStartupProfiler() : recorded_metrics_(false) { | 16 MacStartupProfiler::MacStartupProfiler() : recorded_metrics_(false) { |
17 } | 17 } |
18 | 18 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // method will be the first and only usage of a histogram with that given | 66 // method will be the first and only usage of a histogram with that given |
67 // name. | 67 // name. |
68 base::HistogramBase* histogram = base::Histogram::FactoryTimeGet( | 68 base::HistogramBase* histogram = base::Histogram::FactoryTimeGet( |
69 name, | 69 name, |
70 min, | 70 min, |
71 max, | 71 max, |
72 bucket_count, | 72 bucket_count, |
73 base::HistogramBase::kUmaTargetedHistogramFlag); | 73 base::HistogramBase::kUmaTargetedHistogramFlag); |
74 histogram->AddTime(delta); | 74 histogram->AddTime(delta); |
75 } | 75 } |
OLD | NEW |