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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Initializes mcs_client_, which handles the connection to MCS. | 191 // Initializes mcs_client_, which handles the connection to MCS. |
192 void InitializeMCSClient(scoped_ptr<GCMStore::LoadResult> result); | 192 void InitializeMCSClient(scoped_ptr<GCMStore::LoadResult> result); |
193 // Complets the first time device checkin. | 193 // Complets the first time device checkin. |
194 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info); | 194 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info); |
195 // Starts a login on mcs_client_. | 195 // Starts a login on mcs_client_. |
196 void StartMCSLogin(); | 196 void StartMCSLogin(); |
197 // Resets state to before initialization. | 197 // Resets state to before initialization. |
198 void ResetState(); | 198 void ResetState(); |
199 // Sets state to ready. This will initiate the MCS login and notify the | 199 // Sets state to ready. This will initiate the MCS login and notify the |
200 // delegates. | 200 // delegates. |
201 void OnReady(); | 201 void OnReady(const std::vector<AccountMapping>& account_mappings); |
202 | 202 |
203 // Starts a first time device checkin. | 203 // Starts a first time device checkin. |
204 void StartCheckin(); | 204 void StartCheckin(); |
205 // Completes the device checkin request by parsing the |checkin_response|. | 205 // Completes the device checkin request by parsing the |checkin_response|. |
206 // Function also cleans up the pending checkin. | 206 // Function also cleans up the pending checkin. |
207 void OnCheckinCompleted( | 207 void OnCheckinCompleted( |
208 const checkin_proto::AndroidCheckinResponse& checkin_response); | 208 const checkin_proto::AndroidCheckinResponse& checkin_response); |
209 | 209 |
210 // Callback passed to GCMStore::SetGServicesSettings. | 210 // Callback passed to GCMStore::SetGServicesSettings. |
211 void SetGServicesSettingsCallback(bool success); | 211 void SetGServicesSettingsCallback(bool success); |
(...skipping 107 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 |