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_GCM_NETWORK_CHANNEL_H_ | 5 #ifndef COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_ |
6 #define COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_ | 6 #define COMPONENTS_INVALIDATION_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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual ~GCMNetworkChannel(); | 59 virtual ~GCMNetworkChannel(); |
60 | 60 |
61 // invalidation::NetworkChannel implementation. | 61 // invalidation::NetworkChannel implementation. |
62 virtual void SendMessage(const std::string& message) OVERRIDE; | 62 virtual void SendMessage(const std::string& message) override; |
63 virtual void SetMessageReceiver( | 63 virtual void SetMessageReceiver( |
64 invalidation::MessageCallback* incoming_receiver) OVERRIDE; | 64 invalidation::MessageCallback* incoming_receiver) override; |
65 | 65 |
66 // SyncNetworkChannel implementation. | 66 // SyncNetworkChannel implementation. |
67 virtual void UpdateCredentials(const std::string& email, | 67 virtual void UpdateCredentials(const std::string& email, |
68 const std::string& token) OVERRIDE; | 68 const std::string& token) override; |
69 virtual int GetInvalidationClientType() OVERRIDE; | 69 virtual int GetInvalidationClientType() override; |
70 virtual void RequestDetailedStatus( | 70 virtual void RequestDetailedStatus( |
71 base::Callback<void(const base::DictionaryValue&)> callback) OVERRIDE; | 71 base::Callback<void(const base::DictionaryValue&)> callback) override; |
72 | 72 |
73 // URLFetcherDelegate implementation. | 73 // URLFetcherDelegate implementation. |
74 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 74 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
75 | 75 |
76 // NetworkChangeObserver implementation. | 76 // NetworkChangeObserver implementation. |
77 virtual void OnNetworkChanged( | 77 virtual void OnNetworkChanged( |
78 net::NetworkChangeNotifier::ConnectionType connection_type) OVERRIDE; | 78 net::NetworkChangeNotifier::ConnectionType connection_type) override; |
79 | 79 |
80 protected: | 80 protected: |
81 void ResetRegisterBackoffEntryForTest( | 81 void ResetRegisterBackoffEntryForTest( |
82 const net::BackoffEntry::Policy* policy); | 82 const net::BackoffEntry::Policy* policy); |
83 | 83 |
84 virtual GURL BuildUrl(const std::string& registration_id); | 84 virtual GURL BuildUrl(const std::string& registration_id); |
85 | 85 |
86 private: | 86 private: |
87 friend class GCMNetworkChannelTest; | 87 friend class GCMNetworkChannelTest; |
88 void Register(); | 88 void Register(); |
(...skipping 44 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_GCM_NETWORK_CHANNEL_H_ | 142 #endif // COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_ |
OLD | NEW |