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

Issue 2628733004: Update ConnectionEventTracker to check if there is an in progress attempt. (Closed)

Created:
3 years, 11 months ago by harkness
Modified:
3 years, 11 months ago
CC:
chromium-reviews, Peter Beverloo, johnme+watch_chromium.org, zea+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update ConnectionEventTracker to check if there is an in progress attempt. It is possible to get EndConnectionAttempt when there is not an in progress event, because EndConnectionAttempt is called from SignalConnectionReset, which will be called any time the network changes state. This CL modifies the code to only save the current_event_ if it has data. This also adds a test to validate that multiple SignalConnectionReset calls don't result in saving empty events. BUG=662983 Review-Url: https://codereview.chromium.org/2628733004 Cr-Commit-Position: refs/heads/master@{#443885} Committed: https://chromium.googlesource.com/chromium/src/+/9d9e71b1d98b8a2ae88d8661cbf15ce23e6c3513

Patch Set 1 #

Total comments: 3

Patch Set 2 : Expose EventInProgress() to ConnectionFactoryImpl so that it can control whether EndConnectionAttem… #

Total comments: 6

Patch Set 3 : Rebase and fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -8 lines) Patch
M google_apis/gcm/engine/connection_event_tracker.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M google_apis/gcm/engine/connection_event_tracker.cc View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M google_apis/gcm/engine/connection_factory_impl.cc View 1 2 1 chunk +8 lines, -3 lines 0 comments Download
M google_apis/gcm/engine/connection_factory_impl_unittest.cc View 2 chunks +16 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 16 (7 generated)
harkness
3 years, 11 months ago (2017-01-11 11:10:23 UTC) #2
Peter Beverloo
It seems to me like it'd be cleaner for EndConnectionAttempt to not be called at ...
3 years, 11 months ago (2017-01-11 14:31:48 UTC) #3
harkness
There isn't a simple check for the ConnectionFactoryImpl to know whether an attempt is in ...
3 years, 11 months ago (2017-01-12 11:04:48 UTC) #4
Peter Beverloo
lgtm https://codereview.chromium.org/2628733004/diff/20001/google_apis/gcm/engine/connection_event_tracker.cc File google_apis/gcm/engine/connection_event_tracker.cc (right): https://codereview.chromium.org/2628733004/diff/20001/google_apis/gcm/engine/connection_event_tracker.cc#newcode40 google_apis/gcm/engine/connection_event_tracker.cc:40: // StartConnectionAttempt. optional nit: I'd drop the comment ...
3 years, 11 months ago (2017-01-12 16:03:27 UTC) #5
Nicolas Zea
lgtm
3 years, 11 months ago (2017-01-12 18:02:16 UTC) #6
harkness
https://codereview.chromium.org/2628733004/diff/20001/google_apis/gcm/engine/connection_event_tracker.cc File google_apis/gcm/engine/connection_event_tracker.cc (right): https://codereview.chromium.org/2628733004/diff/20001/google_apis/gcm/engine/connection_event_tracker.cc#newcode40 google_apis/gcm/engine/connection_event_tracker.cc:40: // StartConnectionAttempt. On 2017/01/12 16:03:27, Peter Beverloo (OOO- Jan ...
3 years, 11 months ago (2017-01-16 12:20:37 UTC) #7
commit-bot: I haz the power
This CL has an open dependency (Issue 2620393002 Patch 120001). Please resolve the dependency and ...
3 years, 11 months ago (2017-01-16 12:20:58 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2628733004/40001
3 years, 11 months ago (2017-01-16 12:55:34 UTC) #13
commit-bot: I haz the power
3 years, 11 months ago (2017-01-16 13:40:26 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/9d9e71b1d98b8a2ae88d8661cbf1...

Powered by Google App Engine
This is Rietveld 408576698