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

Side by Side Diff: chrome/browser/chromeos/power/power_data_collector.h

Issue 240343004: chromeos: Update IdleActionImminent and SuspendDone handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 8 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 | Annotate | Revision Log
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_CHROMEOS_POWER_POWER_DATA_COLLECTOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POWER_POWER_DATA_COLLECTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_POWER_POWER_DATA_COLLECTOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_POWER_POWER_DATA_COLLECTOR_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Can be called only if initialized via Initialize, and before 77 // Can be called only if initialized via Initialize, and before
78 // DBusThreadManager is destroyed. 78 // DBusThreadManager is destroyed.
79 static void Shutdown(); 79 static void Shutdown();
80 80
81 // Returns the global instance of PowerDataCollector. 81 // Returns the global instance of PowerDataCollector.
82 static PowerDataCollector* Get(); 82 static PowerDataCollector* Get();
83 83
84 // PowerManagerClient::Observer implementation: 84 // PowerManagerClient::Observer implementation:
85 virtual void PowerChanged( 85 virtual void PowerChanged(
86 const power_manager::PowerSupplyProperties& prop) OVERRIDE; 86 const power_manager::PowerSupplyProperties& prop) OVERRIDE;
87 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE; 87 virtual void SuspendDone(const base::TimeDelta& sleep_duration) OVERRIDE;
88 88
89 // Only those power data samples which fall within the last 89 // Only those power data samples which fall within the last
90 // |kSampleTimeLimitSec| are stored in memory. 90 // |kSampleTimeLimitSec| are stored in memory.
91 static const int kSampleTimeLimitSec; 91 static const int kSampleTimeLimitSec;
92 92
93 private: 93 private:
94 explicit PowerDataCollector(const bool start_cpu_data_collector); 94 explicit PowerDataCollector(const bool start_cpu_data_collector);
95 95
96 virtual ~PowerDataCollector(); 96 virtual ~PowerDataCollector();
97 97
(...skipping 17 matching lines...) Expand all
115 } else { 115 } else {
116 break; 116 break;
117 } 117 }
118 } 118 }
119 sample_queue->push_back(sample); 119 sample_queue->push_back(sample);
120 } 120 }
121 121
122 } // namespace chromeos 122 } // namespace chromeos
123 123
124 #endif // CHROME_BROWSER_CHROMEOS_POWER_POWER_DATA_COLLECTOR_H_ 124 #endif // CHROME_BROWSER_CHROMEOS_POWER_POWER_DATA_COLLECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698