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

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

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 #ifndef CHROME_BROWSER_MAC_MAC_STARTUP_PROFILER_H_ 5 #ifndef CHROME_BROWSER_MAC_MAC_STARTUP_PROFILER_H_
6 #define CHROME_BROWSER_MAC_MAC_STARTUP_PROFILER_H_ 6 #define CHROME_BROWSER_MAC_MAC_STARTUP_PROFILER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 24 matching lines...) Expand all
35 DID_FINISH_LAUNCHING, 35 DID_FINISH_LAUNCHING,
36 }; 36 };
37 37
38 // Record timestamp for the given location event. 38 // Record timestamp for the given location event.
39 void Profile(Location location); 39 void Profile(Location location);
40 40
41 // Call once to record all UMA metrics for all profiled locations. 41 // Call once to record all UMA metrics for all profiled locations.
42 void RecordMetrics(); 42 void RecordMetrics();
43 43
44 private: 44 private:
45 friend struct DefaultSingletonTraits<MacStartupProfiler>; 45 friend struct base::DefaultSingletonTraits<MacStartupProfiler>;
46 46
47 // Returns the name of the histogram for the given location. 47 // Returns the name of the histogram for the given location.
48 const std::string HistogramName(Location location); 48 const std::string HistogramName(Location location);
49 49
50 // Records UMA metrics for a specific location. 50 // Records UMA metrics for a specific location.
51 void RecordHistogram(Location location, const base::TimeDelta& delta); 51 void RecordHistogram(Location location, const base::TimeDelta& delta);
52 52
53 // Keeps track of the time at which each initialization phase was reached. 53 // Keeps track of the time at which each initialization phase was reached.
54 std::map<Location, base::Time> profiled_times_; 54 std::map<Location, base::Time> profiled_times_;
55 55
56 // Whether UMA metrics have been recorded. Only record UMA metrics once. 56 // Whether UMA metrics have been recorded. Only record UMA metrics once.
57 bool recorded_metrics_; 57 bool recorded_metrics_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(MacStartupProfiler); 59 DISALLOW_COPY_AND_ASSIGN(MacStartupProfiler);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_MAC_MAC_STARTUP_PROFILER_H_ 62 #endif // CHROME_BROWSER_MAC_MAC_STARTUP_PROFILER_H_
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privet_url_fetcher.cc ('k') | chrome/browser/mac/mac_startup_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698