|
Link GCM heartbeat with wake on wifi preference
Currently, the GCM heartbeat manager schedules a timer that will always
wake up the system from suspend in order to send a heartbeat message.
This is bad for battery life if the user doesn't actually want to use
the wake on packet feature. To deal with this problem:
- Add a new function, SetWakeFromSuspend, to the AlarmTimer class so
that its wake from suspend ability can be changed on the fly.
- Drill a hole through GCM's beautiful abstraction layers so that we can
get to the HeartbeatManager via the GCMDriver interface.
- Hook up the endpoint in the GCMDriver interface to
WakeOnWifiManager::OnPreferenceChanged so that the wake from suspend
property for all the GCM heartbeat timers is changed along with
shill's settings.
BUG= 397328, chrome-os-partner:34142
Committed: https://crrev.com/192a92175999160848b161f09b5c4a798e39d82c
Cr-Commit-Position: refs/heads/master@{#307151}
Total comments: 8
Total comments: 10
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+203 lines, -61 lines) |
Patch |
 |
M |
chrome/browser/chromeos/net/wake_on_wifi_manager.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/net/wake_on_wifi_manager.cc
|
View
|
1
2
|
5 chunks |
+31 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/fake_gcm_client.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/fake_gcm_client.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/fake_gcm_driver.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/fake_gcm_driver.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_client.h
|
View
|
1
2
3
4
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_client_impl.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_client_impl.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+7 lines, -11 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_client_impl_unittest.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_driver.h
|
View
|
1
2
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_driver_android.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_driver_android.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_driver_desktop.h
|
View
|
1
2
3
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/gcm_driver/gcm_driver_desktop.cc
|
View
|
1
2
3
4
5
6
|
7 chunks |
+48 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/timers/alarm_timer.h
|
View
|
1
2
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/timers/alarm_timer.cc
|
View
|
1
2
|
2 chunks |
+21 lines, -21 lines |
0 comments
|
Download
|
 |
M |
components/timers/rtc_alarm.cc
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
google_apis/gcm/engine/heartbeat_manager.h
|
View
|
1
2
3
4
5
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
google_apis/gcm/engine/heartbeat_manager.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+18 lines, -2 lines |
0 comments
|
Download
|
 |
M |
google_apis/gcm/engine/heartbeat_manager_unittest.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+22 lines, -4 lines |
0 comments
|
Download
|
 |
M |
google_apis/gcm/engine/mcs_client.h
|
View
|
1
2
3
4
5
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
google_apis/gcm/engine/mcs_client.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
google_apis/gcm/engine/mcs_client_unittest.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
google_apis/gcm/tools/mcs_probe.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
Total messages: 28 (4 generated)
|