DescriptionClient-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) #
Messages
Total messages: 15 (0 generated)
|