OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ | 5 #ifndef COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ |
6 #define COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ | 6 #define COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 friend class GCMNetworkChannelTest; | 87 friend class GCMNetworkChannelTest; |
88 void Register(); | 88 void Register(); |
89 void OnRegisterComplete(const std::string& registration_id, | 89 void OnRegisterComplete(const std::string& registration_id, |
90 gcm::GCMClient::Result result); | 90 gcm::GCMClient::Result result); |
91 void RequestAccessToken(); | 91 void RequestAccessToken(); |
92 void OnGetTokenComplete(const GoogleServiceAuthError& error, | 92 void OnGetTokenComplete(const GoogleServiceAuthError& error, |
93 const std::string& token); | 93 const std::string& token); |
94 void OnIncomingMessage(const std::string& message, | 94 void OnIncomingMessage(const std::string& message, |
95 const std::string& echo_token); | 95 const std::string& echo_token); |
96 void OnConnectionStateChanged(bool online); | 96 void OnConnectionStateChanged(bool online); |
| 97 void OnStoreReset(); |
97 void UpdateGcmChannelState(bool online); | 98 void UpdateGcmChannelState(bool online); |
98 void UpdateHttpChannelState(bool online); | 99 void UpdateHttpChannelState(bool online); |
99 | 100 |
100 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 101 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
101 std::unique_ptr<GCMNetworkChannelDelegate> delegate_; | 102 std::unique_ptr<GCMNetworkChannelDelegate> delegate_; |
102 | 103 |
103 // Message is saved until all conditions are met: there is valid | 104 // Message is saved until all conditions are met: there is valid |
104 // registration_id and access_token. | 105 // registration_id and access_token. |
105 std::string cached_message_; | 106 std::string cached_message_; |
106 | 107 |
(...skipping 20 matching lines...) Expand all Loading... |
127 GCMNetworkChannelDiagnostic diagnostic_info_; | 128 GCMNetworkChannelDiagnostic diagnostic_info_; |
128 | 129 |
129 base::WeakPtrFactory<GCMNetworkChannel> weak_factory_; | 130 base::WeakPtrFactory<GCMNetworkChannel> weak_factory_; |
130 | 131 |
131 DISALLOW_COPY_AND_ASSIGN(GCMNetworkChannel); | 132 DISALLOW_COPY_AND_ASSIGN(GCMNetworkChannel); |
132 }; | 133 }; |
133 | 134 |
134 } // namespace syncer | 135 } // namespace syncer |
135 | 136 |
136 #endif // COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ | 137 #endif // COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ |
OLD | NEW |