Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: chrome/browser/mac/mac_startup_profiler.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.h"
9 #include "components/startup_metric_utils/startup_metric_utils.h" 9 #include "components/startup_metric_utils/startup_metric_utils.h"
10 10
11 // static 11 // static
12 MacStartupProfiler* MacStartupProfiler::GetInstance() { 12 MacStartupProfiler* MacStartupProfiler::GetInstance() {
13 return 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
19 MacStartupProfiler::~MacStartupProfiler() { 19 MacStartupProfiler::~MacStartupProfiler() {
20 } 20 }
21 21
22 void MacStartupProfiler::Profile(Location location) { 22 void MacStartupProfiler::Profile(Location location) {
23 profiled_times_[location] = base::Time::Now(); 23 profiled_times_[location] = base::Time::Now();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // method will be the first and only usage of a histogram with that given 71 // method will be the first and only usage of a histogram with that given
72 // name. 72 // name.
73 base::HistogramBase* histogram = base::Histogram::FactoryTimeGet( 73 base::HistogramBase* histogram = base::Histogram::FactoryTimeGet(
74 name, 74 name,
75 min, 75 min,
76 max, 76 max,
77 bucket_count, 77 bucket_count,
78 base::HistogramBase::kUmaTargetedHistogramFlag); 78 base::HistogramBase::kUmaTargetedHistogramFlag);
79 histogram->AddTime(delta); 79 histogram->AddTime(delta);
80 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/mac/mac_startup_profiler.h ('k') | chrome/browser/media/media_capture_devices_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698