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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual ~GCMClientImpl(); | 83 virtual ~GCMClientImpl(); |
84 | 84 |
85 // GCMClient implementation. | 85 // GCMClient implementation. |
86 virtual void Initialize( | 86 virtual void Initialize( |
87 const ChromeBuildInfo& chrome_build_info, | 87 const ChromeBuildInfo& chrome_build_info, |
88 const base::FilePath& store_path, | 88 const base::FilePath& store_path, |
89 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 89 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
90 const scoped_refptr<net::URLRequestContextGetter>& | 90 const scoped_refptr<net::URLRequestContextGetter>& |
91 url_request_context_getter, | 91 url_request_context_getter, |
92 scoped_ptr<Encryptor> encryptor, | 92 scoped_ptr<Encryptor> encryptor, |
93 GCMClient::Delegate* delegate) OVERRIDE; | 93 GCMClient::Delegate* delegate) override; |
94 virtual void Start() OVERRIDE; | 94 virtual void Start() override; |
95 virtual void Stop() OVERRIDE; | 95 virtual void Stop() override; |
96 virtual void CheckOut() OVERRIDE; | 96 virtual void CheckOut() override; |
97 virtual void Register(const std::string& app_id, | 97 virtual void Register(const std::string& app_id, |
98 const std::vector<std::string>& sender_ids) OVERRIDE; | 98 const std::vector<std::string>& sender_ids) override; |
99 virtual void Unregister(const std::string& app_id) OVERRIDE; | 99 virtual void Unregister(const std::string& app_id) override; |
100 virtual void Send(const std::string& app_id, | 100 virtual void Send(const std::string& app_id, |
101 const std::string& receiver_id, | 101 const std::string& receiver_id, |
102 const OutgoingMessage& message) OVERRIDE; | 102 const OutgoingMessage& message) override; |
103 virtual void SetRecording(bool recording) OVERRIDE; | 103 virtual void SetRecording(bool recording) override; |
104 virtual void ClearActivityLogs() OVERRIDE; | 104 virtual void ClearActivityLogs() override; |
105 virtual GCMStatistics GetStatistics() const OVERRIDE; | 105 virtual GCMStatistics GetStatistics() const override; |
106 virtual void SetAccountTokens( | 106 virtual void SetAccountTokens( |
107 const std::vector<AccountTokenInfo>& account_tokens) OVERRIDE; | 107 const std::vector<AccountTokenInfo>& account_tokens) override; |
108 virtual void UpdateAccountMapping( | 108 virtual void UpdateAccountMapping( |
109 const AccountMapping& account_mapping) OVERRIDE; | 109 const AccountMapping& account_mapping) override; |
110 virtual void RemoveAccountMapping(const std::string& account_id) OVERRIDE; | 110 virtual void RemoveAccountMapping(const std::string& account_id) override; |
111 | 111 |
112 // GCMStatsRecorder::Delegate implemenation. | 112 // GCMStatsRecorder::Delegate implemenation. |
113 virtual void OnActivityRecorded() OVERRIDE; | 113 virtual void OnActivityRecorded() override; |
114 | 114 |
115 // ConnectionFactory::ConnectionListener implementation. | 115 // ConnectionFactory::ConnectionListener implementation. |
116 virtual void OnConnected(const GURL& current_server, | 116 virtual void OnConnected(const GURL& current_server, |
117 const net::IPEndPoint& ip_endpoint) OVERRIDE; | 117 const net::IPEndPoint& ip_endpoint) override; |
118 virtual void OnDisconnected() OVERRIDE; | 118 virtual void OnDisconnected() override; |
119 | 119 |
120 private: | 120 private: |
121 // State representation of the GCMClient. | 121 // State representation of the GCMClient. |
122 // Any change made to this enum should have corresponding change in the | 122 // Any change made to this enum should have corresponding change in the |
123 // GetStateString(...) function. | 123 // GetStateString(...) function. |
124 enum State { | 124 enum State { |
125 // Uninitialized. | 125 // Uninitialized. |
126 UNINITIALIZED, | 126 UNINITIALIZED, |
127 // Initialized, | 127 // Initialized, |
128 INITIALIZED, | 128 INITIALIZED, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 // Factory for creating references in callbacks. | 320 // Factory for creating references in callbacks. |
321 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; | 321 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; |
322 | 322 |
323 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); | 323 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); |
324 }; | 324 }; |
325 | 325 |
326 } // namespace gcm | 326 } // namespace gcm |
327 | 327 |
328 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 328 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
OLD | NEW |