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

Side by Side Diff: content/browser/power_profiler/power_data_provider.h

Issue 309803002: [PowerProfiler] Power Profiler service should detect the sampling rate from the data provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | content/browser/power_profiler/power_data_provider_ia_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ 5 #ifndef CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_
6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ 6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/browser/power_profiler/power_event.h" 11 #include "content/browser/power_profiler/power_event.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 typedef std::vector<PowerEvent> PowerEventVector; 15 typedef std::vector<PowerEvent> PowerEventVector;
16 16
17 // A class used to get power usage. 17 // A class used to get power usage.
18 class PowerDataProvider { 18 class PowerDataProvider {
19 public: 19 public:
20 static scoped_ptr<PowerDataProvider> Create(); 20 static scoped_ptr<PowerDataProvider> Create();
21 21
22 PowerDataProvider() {} 22 PowerDataProvider() {}
23 virtual ~PowerDataProvider() {} 23 virtual ~PowerDataProvider() {}
24 24
25 // Returns a vector of power events, one per type, for the types it supports. 25 // Returns a vector of power events, one per type, for the types it supports.
26 virtual PowerEventVector GetData() = 0; 26 virtual PowerEventVector GetData() = 0;
27
28 // Returns sampling rate at which the provider can operate in milliseconds
29 virtual int64 SamplingRate() = 0;
sky 2014/06/03 15:41:01 How about: virtual base::TimeDelta GetSamplingRate
vivekg 2014/06/04 04:35:45 Done. Yes it makes sense to return the TimeDelta i
27 }; 30 };
28 31
29 } // namespace content 32 } // namespace content
30 33
31 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ 34 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/power_profiler/power_data_provider_ia_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698