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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 bool last_message_empty_echo_token_; | 39 bool last_message_empty_echo_token_; |
40 base::Time last_message_received_time_; | 40 base::Time last_message_received_time_; |
41 int last_post_response_code_; | 41 int last_post_response_code_; |
42 std::string registration_id_; | 42 std::string registration_id_; |
43 gcm::GCMClient::Result registration_result_; | 43 gcm::GCMClient::Result registration_result_; |
44 int sent_messages_count_; | 44 int sent_messages_count_; |
45 }; | 45 }; |
46 | 46 |
47 // GCMNetworkChannel is an implementation of SyncNetworkChannel that routes | 47 // GCMNetworkChannel is an implementation of SyncNetworkChannel that routes |
48 // messages through GCMService. | 48 // messages through GCMService. |
49 class INVALIDATION_EXPORT_PRIVATE GCMNetworkChannel | 49 class INVALIDATION_EXPORT GCMNetworkChannel |
50 : public SyncNetworkChannel, | 50 : public SyncNetworkChannel, |
51 public net::URLFetcherDelegate, | 51 public net::URLFetcherDelegate, |
52 public net::NetworkChangeNotifier::NetworkChangeObserver, | 52 public net::NetworkChangeNotifier::NetworkChangeObserver, |
53 public base::NonThreadSafe { | 53 public base::NonThreadSafe { |
54 public: | 54 public: |
55 GCMNetworkChannel( | 55 GCMNetworkChannel( |
56 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 56 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
57 scoped_ptr<GCMNetworkChannelDelegate> delegate); | 57 scoped_ptr<GCMNetworkChannelDelegate> delegate); |
58 | 58 |
59 ~GCMNetworkChannel() override; | 59 ~GCMNetworkChannel() override; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 GCMNetworkChannelDiagnostic diagnostic_info_; | 133 GCMNetworkChannelDiagnostic diagnostic_info_; |
134 | 134 |
135 base::WeakPtrFactory<GCMNetworkChannel> weak_factory_; | 135 base::WeakPtrFactory<GCMNetworkChannel> weak_factory_; |
136 | 136 |
137 DISALLOW_COPY_AND_ASSIGN(GCMNetworkChannel); | 137 DISALLOW_COPY_AND_ASSIGN(GCMNetworkChannel); |
138 }; | 138 }; |
139 | 139 |
140 } // namespace syncer | 140 } // namespace syncer |
141 | 141 |
142 #endif // COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ | 142 #endif // COMPONENTS_INVALIDATION_IMPL_GCM_NETWORK_CHANNEL_H_ |
OLD | NEW |