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

Issue 140513002: Client-to-server messages in GCMNetworkChannel (Closed)

Created:
6 years, 11 months ago by pavely
Modified:
6 years, 11 months ago
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Client-to-server messages in GCMNetworkChannel This change implements sending client-to-server messages in GCMNetworkChannel. Implementation mimics what android implementation is doing. To send message to server GCMNetworkChannel needs GCM registration Id and access token. Registration Id is requested during initialization and doesn’t change through process lifetime. Access token is requested for every message. Errors are not handled, cacheinvalidations will retry sending message if it doesn’t see confirmation from server that the message was received. The only handled error is HTTP_UNAUTHORIZED from tango server since access token needs to be invalidated in this case. Actual work of requesting registration id and access token is delegated to GCMNetworkChannelDelegate interface. Implementation of this interface will live in chrome/browser/invalidation directory and will use GCMProfileService for registration and ProfileOAuth2TokenService for token functions. There are two things that are still not implemented: - Register error handling: will need to implement retry. - Building url for tango endpoint: this involves preparing and base64 encoding NetworkEndpointId protobuf from cacheinvalidations library. Will address both in next CL. BUG=325020 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246377

Patch Set 1 #

Total comments: 23

Patch Set 2 : Rebase. Apply feedback. #

Patch Set 3 : Two more tests #

Total comments: 15

Patch Set 4 : Minor fixes #

Patch Set 5 : Fix MAC build error #

Patch Set 6 : Fix mac build error (for real) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -23 lines) Patch
M chrome/browser/invalidation/ticl_invalidation_service.cc View 2 chunks +7 lines, -1 line 0 comments Download
M sync/notifier/DEPS View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/notifier/gcm_network_channel.h View 1 2 3 1 chunk +42 lines, -3 lines 0 comments Download
M sync/notifier/gcm_network_channel.cc View 1 2 3 1 chunk +108 lines, -2 lines 0 comments Download
A sync/notifier/gcm_network_channel_delegate.h View 1 2 3 1 chunk +46 lines, -0 lines 0 comments Download
M sync/notifier/gcm_network_channel_unittest.cc View 1 2 3 2 chunks +218 lines, -8 lines 0 comments Download
M sync/notifier/non_blocking_invalidator.h View 2 chunks +4 lines, -1 line 0 comments Download
M sync/notifier/non_blocking_invalidator.cc View 1 2 chunks +7 lines, -3 lines 0 comments Download
M sync/notifier/sync_system_resources.h View 1 2 chunks +5 lines, -1 line 0 comments Download
M sync/notifier/sync_system_resources.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M sync/sync_notifier.gypi View 5 1 chunk +1 line, -0 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
pavely
6 years, 11 months ago (2014-01-16 02:29:04 UTC) #1
rlarocque
Some comments, mostly style nits. At some point I stopped commenting on indentation style issues. ...
6 years, 11 months ago (2014-01-16 18:52:48 UTC) #2
pavely
https://codereview.chromium.org/140513002/diff/1/sync/notifier/gcm_network_channel.cc File sync/notifier/gcm_network_channel.cc (right): https://codereview.chromium.org/140513002/diff/1/sync/notifier/gcm_network_channel.cc#newcode32 sync/notifier/gcm_network_channel.cc:32: void GCMNetworkChannel::OnRegisterComplete(const std::string& registration_id, On 2014/01/16 18:52:48, rlarocque wrote: ...
6 years, 11 months ago (2014-01-17 00:44:39 UTC) #3
rlarocque
I've got one more comment about tests. Everything else is LGTM, so feel free to ...
6 years, 11 months ago (2014-01-17 01:40:47 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/140513002/140001
6 years, 11 months ago (2014-01-17 19:23:09 UTC) #5
tim (not reviewing)
https://codereview.chromium.org/140513002/diff/140001/sync/notifier/gcm_network_channel.cc File sync/notifier/gcm_network_channel.cc (right): https://codereview.chromium.org/140513002/diff/140001/sync/notifier/gcm_network_channel.cc#newcode45 sync/notifier/gcm_network_channel.cc:45: // TODO(pavely): Don't know what to do if registration ...
6 years, 11 months ago (2014-01-17 19:33:41 UTC) #6
pavely
https://codereview.chromium.org/140513002/diff/140001/sync/notifier/gcm_network_channel.cc File sync/notifier/gcm_network_channel.cc (right): https://codereview.chromium.org/140513002/diff/140001/sync/notifier/gcm_network_channel.cc#newcode45 sync/notifier/gcm_network_channel.cc:45: // TODO(pavely): Don't know what to do if registration ...
6 years, 11 months ago (2014-01-17 22:52:25 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pavely@chromium.org/140513002/360012
6 years, 11 months ago (2014-01-21 23:35:45 UTC) #8
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=45742
6 years, 11 months ago (2014-01-21 23:55:54 UTC) #9
pavely
+Ryan Hamilton for sync/notifier/DEPS: I changed DEPS file to refer net/url_request and net/http/http_status_code.h. Should be ...
6 years, 11 months ago (2014-01-22 02:10:36 UTC) #10
Ryan Hamilton
On 2014/01/22 02:10:36, pavely wrote: > +Ryan Hamilton for sync/notifier/DEPS: I changed DEPS file to ...
6 years, 11 months ago (2014-01-22 04:21:55 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pavely@chromium.org/140513002/360012
6 years, 11 months ago (2014-01-22 04:38:01 UTC) #12
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test on builder ...
6 years, 11 months ago (2014-01-22 10:47:03 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pavely@chromium.org/140513002/360012
6 years, 11 months ago (2014-01-22 17:21:15 UTC) #14
commit-bot: I haz the power
6 years, 11 months ago (2014-01-22 18:36:21 UTC) #15
Message was sent while issue was closed.
Change committed as 246377

Powered by Google App Engine
This is Rietveld 408576698