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_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual scoped_ptr<base::Clock> BuildClock(); | 57 virtual scoped_ptr<base::Clock> BuildClock(); |
58 virtual scoped_ptr<MCSClient> BuildMCSClient( | 58 virtual scoped_ptr<MCSClient> BuildMCSClient( |
59 const std::string& version, | 59 const std::string& version, |
60 base::Clock* clock, | 60 base::Clock* clock, |
61 ConnectionFactory* connection_factory, | 61 ConnectionFactory* connection_factory, |
62 GCMStore* gcm_store, | 62 GCMStore* gcm_store, |
63 GCMStatsRecorder* recorder); | 63 GCMStatsRecorder* recorder); |
64 virtual scoped_ptr<ConnectionFactory> BuildConnectionFactory( | 64 virtual scoped_ptr<ConnectionFactory> BuildConnectionFactory( |
65 const std::vector<GURL>& endpoints, | 65 const std::vector<GURL>& endpoints, |
66 const net::BackoffEntry::Policy& backoff_policy, | 66 const net::BackoffEntry::Policy& backoff_policy, |
67 scoped_refptr<net::HttpNetworkSession> network_session, | 67 const scoped_refptr<net::HttpNetworkSession>& gcm_network_session, |
| 68 const scoped_refptr<net::HttpNetworkSession>& http_network_session, |
68 net::NetLog* net_log, | 69 net::NetLog* net_log, |
69 GCMStatsRecorder* recorder); | 70 GCMStatsRecorder* recorder); |
70 }; | 71 }; |
71 | 72 |
72 // Implements the GCM Client. It is used to coordinate MCS Client (communication | 73 // Implements the GCM Client. It is used to coordinate MCS Client (communication |
73 // with MCS) and other pieces of GCM infrastructure like Registration and | 74 // with MCS) and other pieces of GCM infrastructure like Registration and |
74 // Checkins. It also allows for registering user delegates that host | 75 // Checkins. It also allows for registering user delegates that host |
75 // applications that send and receive messages. | 76 // applications that send and receive messages. |
76 class GCMClientImpl | 77 class GCMClientImpl |
77 : public GCMClient, public GCMStatsRecorder::Delegate, | 78 : public GCMClient, public GCMStatsRecorder::Delegate, |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 299 |
299 // Factory for creating references in callbacks. | 300 // Factory for creating references in callbacks. |
300 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; | 301 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; |
301 | 302 |
302 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); | 303 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); |
303 }; | 304 }; |
304 | 305 |
305 } // namespace gcm | 306 } // namespace gcm |
306 | 307 |
307 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 308 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
OLD | NEW |