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

Issue 118133003: [GCM] Add heartbeat manager and reconnection logic due to heartbeat failure (Closed)

Created:
7 years ago by Nicolas Zea
Modified:
6 years, 11 months ago
Reviewers:
jianli, fgorski
CC:
chromium-reviews
Visibility:
Public.

Description

[GCM] Add heartbeat manager and reconnection logic due to heartbeat failure The heartbeat manager maintains the heartbeat timer, handles heartbeat interval updates from the server, and automatically triggers connection resets if the heartbeat isn't properly acknowledged in a timely manner. Also fixes an issue in reconnection where the client socket handle doesn't deal well with a connection reset due to passing ownership of the socket. BUG=284553 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242848

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address comments #

Total comments: 10

Patch Set 3 : Address Jian's comments #

Total comments: 4

Patch Set 4 : Unrevert fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+427 lines, -40 lines) Patch
M google_apis/gcm/engine/connection_factory_impl.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M google_apis/gcm/engine/connection_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M google_apis/gcm/engine/connection_handler_impl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M google_apis/gcm/engine/connection_handler_impl.cc View 3 chunks +4 lines, -6 lines 0 comments Download
M google_apis/gcm/engine/connection_handler_impl_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M google_apis/gcm/engine/fake_connection_factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M google_apis/gcm/engine/fake_connection_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M google_apis/gcm/engine/fake_connection_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
A google_apis/gcm/engine/heartbeat_manager.h View 1 2 1 chunk +82 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/heartbeat_manager.cc View 1 2 3 1 chunk +119 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/heartbeat_manager_unittest.cc View 1 2 1 chunk +176 lines, -0 lines 0 comments Download
M google_apis/gcm/engine/mcs_client.h View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M google_apis/gcm/engine/mcs_client.cc View 1 2 13 chunks +22 lines, -19 lines 0 comments Download
M google_apis/gcm/gcm.gyp View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Nicolas Zea
PTAL
7 years ago (2013-12-19 23:27:51 UTC) #1
fgorski
A few comments. https://codereview.chromium.org/118133003/diff/1/google_apis/gcm/engine/connection_handler_impl.cc File google_apis/gcm/engine/connection_handler_impl.cc (left): https://codereview.chromium.org/118133003/diff/1/google_apis/gcm/engine/connection_handler_impl.cc#oldcode397 google_apis/gcm/engine/connection_handler_impl.cc:397: write_callback_.Reset(); Did you mean to remove ...
7 years ago (2013-12-19 23:55:13 UTC) #2
Nicolas Zea
https://codereview.chromium.org/118133003/diff/1/google_apis/gcm/engine/connection_handler_impl.cc File google_apis/gcm/engine/connection_handler_impl.cc (left): https://codereview.chromium.org/118133003/diff/1/google_apis/gcm/engine/connection_handler_impl.cc#oldcode397 google_apis/gcm/engine/connection_handler_impl.cc:397: write_callback_.Reset(); On 2013/12/19 23:55:13, Filip Gorski wrote: > Did ...
7 years ago (2013-12-20 22:52:56 UTC) #3
fgorski
lgtm
7 years ago (2013-12-20 23:01:50 UTC) #4
jianli
https://codereview.chromium.org/118133003/diff/20001/google_apis/gcm/engine/heartbeat_manager.cc File google_apis/gcm/engine/heartbeat_manager.cc (right): https://codereview.chromium.org/118133003/diff/20001/google_apis/gcm/engine/heartbeat_manager.cc#newcode22 google_apis/gcm/engine/heartbeat_manager.cc:22: : waiting_for_ack_(false), nit: alignment https://codereview.chromium.org/118133003/diff/20001/google_apis/gcm/engine/heartbeat_manager.cc#newcode26 google_apis/gcm/engine/heartbeat_manager.cc:26: HeartbeatManager::~HeartbeatManager() {} nit: ...
7 years ago (2013-12-20 23:10:03 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zea@chromium.org/118133003/20001
7 years ago (2013-12-20 23:10:28 UTC) #6
Nicolas Zea
PTAL https://codereview.chromium.org/118133003/diff/20001/google_apis/gcm/engine/heartbeat_manager.cc File google_apis/gcm/engine/heartbeat_manager.cc (right): https://codereview.chromium.org/118133003/diff/20001/google_apis/gcm/engine/heartbeat_manager.cc#newcode22 google_apis/gcm/engine/heartbeat_manager.cc:22: : waiting_for_ack_(false), On 2013/12/20 23:10:03, jianli wrote: > ...
6 years, 12 months ago (2013-12-26 22:55:01 UTC) #7
fgorski
It seems that you reverted some of the changes by accident. https://codereview.chromium.org/118133003/diff/180001/google_apis/gcm/engine/heartbeat_manager.cc File google_apis/gcm/engine/heartbeat_manager.cc (right): ...
6 years, 12 months ago (2013-12-26 23:04:08 UTC) #8
Nicolas Zea
Woops, good catch, apparently I was checked out an older version. Brought back the fixes. ...
6 years, 12 months ago (2013-12-26 23:09:05 UTC) #9
jianli
lgtm
6 years, 11 months ago (2014-01-02 20:03:36 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zea@chromium.org/118133003/270001
6 years, 11 months ago (2014-01-02 20:07:11 UTC) #11
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=241059
6 years, 11 months ago (2014-01-02 23:24:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zea@chromium.org/118133003/270001
6 years, 11 months ago (2014-01-02 23:25:11 UTC) #13
commit-bot: I haz the power
6 years, 11 months ago (2014-01-03 00:53:35 UTC) #14
Message was sent while issue was closed.
Change committed as 242848

Powered by Google App Engine
This is Rietveld 408576698