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 #ifndef CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_SERVICE_H_ | 5 #ifndef CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_SERVICE_H_ |
6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_SERVICE_H_ | 6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_SERVICE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 virtual ~PowerProfilerService(); | 31 virtual ~PowerProfilerService(); |
32 | 32 |
33 private: | 33 private: |
34 enum Status { | 34 enum Status { |
35 UNINITIALIZED, | 35 UNINITIALIZED, |
36 INITIALIZED, // Initialized, profiling has not started. | 36 INITIALIZED, // Initialized, profiling has not started. |
37 PROFILING | 37 PROFILING |
38 }; | 38 }; |
39 | 39 |
40 friend struct DefaultSingletonTraits<PowerProfilerService>; | 40 friend struct base::DefaultSingletonTraits<PowerProfilerService>; |
41 friend class PowerProfilerServiceTest; | 41 friend class PowerProfilerServiceTest; |
42 | 42 |
43 PowerProfilerService(); | 43 PowerProfilerService(); |
44 | 44 |
45 PowerProfilerService(scoped_ptr<PowerDataProvider> provider, | 45 PowerProfilerService(scoped_ptr<PowerDataProvider> provider, |
46 scoped_refptr<base::TaskRunner> task_runner, | 46 scoped_refptr<base::TaskRunner> task_runner, |
47 const base::TimeDelta& sample_period); | 47 const base::TimeDelta& sample_period); |
48 | 48 |
49 void Start(); | 49 void Start(); |
50 void Stop(); | 50 void Stop(); |
(...skipping 18 matching lines...) Expand all Loading... |
69 base::ObserverList<PowerProfilerObserver> observers_; | 69 base::ObserverList<PowerProfilerObserver> observers_; |
70 | 70 |
71 scoped_ptr<PowerDataProvider> data_provider_; | 71 scoped_ptr<PowerDataProvider> data_provider_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(PowerProfilerService); | 73 DISALLOW_COPY_AND_ASSIGN(PowerProfilerService); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace content | 76 } // namespace content |
77 | 77 |
78 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_SERVICE_H_ | 78 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_SERVICE_H_ |
OLD | NEW |