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

Issue 348503002: Report InvalidatorState correctly from GCMNetworkChannel (Closed)

Created:
6 years, 6 months ago by pavely
Modified:
6 years, 6 months ago
Reviewers:
rlarocque, Nicolas Zea
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@GCM.ConnectionState
Project:
chromium
Visibility:
Public.

Description

Report InvalidatorState correctly from GCMNetworkChannel The problem: Sync observes Invalidator state to decide whenever to use PreCommit GU optimization, therefore INVALIDATIONS_ENABLED should be reported only when it is certain that communication channel between client and invalidations server works both ways. SyncNetworkChannel::NotifyStateChange is currently used for two purposes: - Notify observers of invalidations about InvalidatorState - Nudge cacheinvalidations to send heartbeat on network status change. Because of this dual purpose it is called with INVALIDATIONS_ENABLED when network status changes. In this case sync is notified that invalidations are enabled while there is no GCM connection established. Solution: - Separate two purposes into separate functions and call them appropriately - Only set INVALIDATIONS_ENABLED when it is confirmed that both http and gcm channels are working. BUG=377911 R=rlarocque@chromium.org,zea@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278597

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 2

Patch Set 3 : Feedback #

Patch Set 4 : Fix SyncNetworkChannelTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -89 lines) Patch
M chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc View 4 chunks +7 lines, -12 lines 0 comments Download
M components/invalidation/gcm_invalidation_bridge.cc View 5 chunks +12 lines, -8 lines 0 comments Download
M components/invalidation/gcm_network_channel.h View 2 chunks +8 lines, -3 lines 0 comments Download
M components/invalidation/gcm_network_channel.cc View 5 chunks +33 lines, -24 lines 0 comments Download
M components/invalidation/gcm_network_channel_delegate.h View 1 chunk +1 line, -7 lines 0 comments Download
M components/invalidation/gcm_network_channel_unittest.cc View 4 chunks +21 lines, -14 lines 0 comments Download
M components/invalidation/push_client_channel.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M components/invalidation/sync_system_resources.h View 1 2 2 chunks +13 lines, -4 lines 0 comments Download
M components/invalidation/sync_system_resources.cc View 3 chunks +11 lines, -8 lines 0 comments Download
M components/invalidation/sync_system_resources_unittest.cc View 1 2 3 2 chunks +14 lines, -7 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
pavely
6 years, 6 months ago (2014-06-19 01:05:02 UTC) #1
rlarocque
LGTM https://codereview.chromium.org/348503002/diff/20001/components/invalidation/sync_system_resources.h File components/invalidation/sync_system_resources.h (right): https://codereview.chromium.org/348503002/diff/20001/components/invalidation/sync_system_resources.h#newcode149 components/invalidation/sync_system_resources.h:149: void NotifyNetworkStatusChange(bool online); nit: Could you add some ...
6 years, 6 months ago (2014-06-19 16:13:33 UTC) #2
pavely
https://codereview.chromium.org/348503002/diff/20001/components/invalidation/sync_system_resources.h File components/invalidation/sync_system_resources.h (right): https://codereview.chromium.org/348503002/diff/20001/components/invalidation/sync_system_resources.h#newcode149 components/invalidation/sync_system_resources.h:149: void NotifyNetworkStatusChange(bool online); On 2014/06/19 16:13:33, rlarocque wrote: > ...
6 years, 6 months ago (2014-06-19 17:29:15 UTC) #3
pavely
The CQ bit was checked by pavely@chromium.org
6 years, 6 months ago (2014-06-19 17:29:21 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pavely@chromium.org/348503002/40001
6 years, 6 months ago (2014-06-19 17:31:22 UTC) #5
pavely
The CQ bit was checked by pavely@chromium.org
6 years, 6 months ago (2014-06-19 20:03:13 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pavely@chromium.org/348503002/60001
6 years, 6 months ago (2014-06-19 20:04:16 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-20 04:42:16 UTC) #8
Message was sent while issue was closed.
Change committed as 278597

Powered by Google App Engine
This is Rietveld 408576698