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

Side by Side Diff: chrome/browser/performance_monitor/performance_monitor.h

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 (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 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ 5 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_
6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ 6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 class PerformanceMonitor { 25 class PerformanceMonitor {
26 public: 26 public:
27 // Returns the current PerformanceMonitor instance if one exists; otherwise 27 // Returns the current PerformanceMonitor instance if one exists; otherwise
28 // constructs a new PerformanceMonitor. 28 // constructs a new PerformanceMonitor.
29 static PerformanceMonitor* GetInstance(); 29 static PerformanceMonitor* GetInstance();
30 30
31 // Start the cycle of metrics gathering. 31 // Start the cycle of metrics gathering.
32 void StartGatherCycle(); 32 void StartGatherCycle();
33 33
34 private: 34 private:
35 friend struct base::DefaultLazyInstanceTraits<PerformanceMonitor>; 35 friend struct base::LazyInstanceTraitsBase<PerformanceMonitor>;
36 36
37 using MetricsMap = 37 using MetricsMap =
38 std::map<base::ProcessHandle, std::unique_ptr<ProcessMetricsHistory>>; 38 std::map<base::ProcessHandle, std::unique_ptr<ProcessMetricsHistory>>;
39 39
40 PerformanceMonitor(); 40 PerformanceMonitor();
41 ~PerformanceMonitor(); 41 ~PerformanceMonitor();
42 42
43 // Perform any collections that are done on a timed basis. 43 // Perform any collections that are done on a timed basis.
44 void DoTimedCollections(); 44 void DoTimedCollections();
45 45
(...skipping 19 matching lines...) Expand all
65 65
66 // The timer to signal PerformanceMonitor to perform its timed collections. 66 // The timer to signal PerformanceMonitor to perform its timed collections.
67 base::OneShotTimer repeating_timer_; 67 base::OneShotTimer repeating_timer_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); 69 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor);
70 }; 70 };
71 71
72 } // namespace performance_monitor 72 } // namespace performance_monitor
73 73
74 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ 74 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/sth_distributor_provider.cc ('k') | chrome/browser/performance_monitor/performance_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698