Chromium Code Reviews| Index: components/invalidation/sync_system_resources.h |
| diff --git a/components/invalidation/sync_system_resources.h b/components/invalidation/sync_system_resources.h |
| index cbc0dc27b0e4d0889df2db673e3bdb53ad3d35a2..75f90e28f8c5187b3f79d3d80470634c728a899e 100644 |
| --- a/components/invalidation/sync_system_resources.h |
| +++ b/components/invalidation/sync_system_resources.h |
| @@ -143,8 +143,15 @@ class INVALIDATION_EXPORT_PRIVATE SyncNetworkChannel |
| int GetReceivedMessagesCount() const; |
| protected: |
| - // Subclass should notify about connection state through NotifyStateChange. |
| - void NotifyStateChange(InvalidatorState invalidator_state); |
| + // Subclass should call NotifyNetworkStatusChange to notify about network |
| + // changes. This triggers cacheinvalidation to try resending failed message |
| + // ahead of schedule when client comes online or IP address changes. |
| + void NotifyNetworkStatusChange(bool online); |
|
rlarocque
2014/06/19 16:13:33
nit: Could you add some spacing between these meth
pavely
2014/06/19 17:29:15
Done.
|
| + // Subclass should notify about connection state through |
| + // NotifyChannelStateChange. If communication doesn't work and it is possible |
| + // that invalidations from server will not reach this client then channel |
| + // should call this function with TRANSIENT_INVALIDATION_ERROR. |
| + void NotifyChannelStateChange(InvalidatorState invalidator_state); |
| // Subclass should call DeliverIncomingMessage for message to reach |
| // invalidations library. |
| bool DeliverIncomingMessage(const std::string& message); |
| @@ -157,8 +164,8 @@ class INVALIDATION_EXPORT_PRIVATE SyncNetworkChannel |
| scoped_ptr<invalidation::MessageCallback> incoming_receiver_; |
| NetworkStatusReceiverList network_status_receivers_; |
| - // Last channel state for new network status receivers. |
| - InvalidatorState invalidator_state_; |
| + // Last network status for new network status receivers. |
| + bool last_network_status_; |
| int received_messages_count_; |