| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ | 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ |
| 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ | 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Receives confirmation of sent messages or information about errors. | 96 // Receives confirmation of sent messages or information about errors. |
| 97 void OnMessageSentToMCS(int64 user_serial_number, | 97 void OnMessageSentToMCS(int64 user_serial_number, |
| 98 const std::string& app_id, | 98 const std::string& app_id, |
| 99 const std::string& message_id, | 99 const std::string& message_id, |
| 100 MCSClient::MessageSendStatus status); | 100 MCSClient::MessageSendStatus status); |
| 101 // Receives information about mcs_client_ errors. | 101 // Receives information about mcs_client_ errors. |
| 102 void OnMCSError(); | 102 void OnMCSError(); |
| 103 | 103 |
| 104 // Runs after GCM Store load is done to trigger continuation of the | 104 // Runs after GCM Store load is done to trigger continuation of the |
| 105 // initialization. | 105 // initialization. |
| 106 void OnLoadCompleted(const GCMStore::LoadResult& result); | 106 void OnLoadCompleted(scoped_ptr<GCMStore::LoadResult> result); |
| 107 // Initializes mcs_client_, which handles the connection to MCS. | 107 // Initializes mcs_client_, which handles the connection to MCS. |
| 108 void InitializeMCSClient(const GCMStore::LoadResult& result); | 108 void InitializeMCSClient(scoped_ptr<GCMStore::LoadResult> result); |
| 109 // Complets the first time device checkin. | 109 // Complets the first time device checkin. |
| 110 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info); | 110 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info); |
| 111 // Starts a login on mcs_client_. | 111 // Starts a login on mcs_client_. |
| 112 void StartMCSLogin(); | 112 void StartMCSLogin(); |
| 113 // Resets state to before initialization. | 113 // Resets state to before initialization. |
| 114 void ResetState(); | 114 void ResetState(); |
| 115 | 115 |
| 116 // Startes a checkin request for a user with specified |serial_number|. | 116 // Startes a checkin request for a user with specified |serial_number|. |
| 117 // Checkin info can be invalid, in which case it is considered a first time | 117 // Checkin info can be invalid, in which case it is considered a first time |
| 118 // checkin. | 118 // checkin. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // Currently pending checkins. GCMClientImpl owns the CheckinRequests. | 177 // Currently pending checkins. GCMClientImpl owns the CheckinRequests. |
| 178 PendingCheckins pending_checkins_; | 178 PendingCheckins pending_checkins_; |
| 179 STLValueDeleter<PendingCheckins> pending_checkins_deleter_; | 179 STLValueDeleter<PendingCheckins> pending_checkins_deleter_; |
| 180 | 180 |
| 181 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); | 181 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 } // namespace gcm | 184 } // namespace gcm |
| 185 | 185 |
| 186 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ | 186 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ |
| OLD | NEW |