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 #include "google_apis/gcm/gcm_client_impl.h" | 5 #include "google_apis/gcm/gcm_client_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 device_checkin_info_.secret, | 305 device_checkin_info_.secret, |
306 gservices_settings_->digest(), | 306 gservices_settings_->digest(), |
307 account_ids_, | 307 account_ids_, |
308 chrome_build_proto_); | 308 chrome_build_proto_); |
309 checkin_request_.reset( | 309 checkin_request_.reset( |
310 new CheckinRequest(gservices_settings_->checkin_url(), | 310 new CheckinRequest(gservices_settings_->checkin_url(), |
311 request_info, | 311 request_info, |
312 kDefaultBackoffPolicy, | 312 kDefaultBackoffPolicy, |
313 base::Bind(&GCMClientImpl::OnCheckinCompleted, | 313 base::Bind(&GCMClientImpl::OnCheckinCompleted, |
314 weak_ptr_factory_.GetWeakPtr()), | 314 weak_ptr_factory_.GetWeakPtr()), |
315 url_request_context_getter_)); | 315 url_request_context_getter_, |
| 316 &recorder_)); |
316 checkin_request_->Start(); | 317 checkin_request_->Start(); |
317 } | 318 } |
318 | 319 |
319 void GCMClientImpl::OnCheckinCompleted( | 320 void GCMClientImpl::OnCheckinCompleted( |
320 const checkin_proto::AndroidCheckinResponse& checkin_response) { | 321 const checkin_proto::AndroidCheckinResponse& checkin_response) { |
321 checkin_request_.reset(); | 322 checkin_request_.reset(); |
322 | 323 |
323 if (!checkin_response.has_android_id() || | 324 if (!checkin_response.has_android_id() || |
324 !checkin_response.has_security_token()) { | 325 !checkin_response.has_security_token()) { |
325 // TODO(fgorski): I don't think a retry here will help, we should probably | 326 // TODO(fgorski): I don't think a retry here will help, we should probably |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 | 756 |
756 recorder_.RecordIncomingSendError( | 757 recorder_.RecordIncomingSendError( |
757 data_message_stanza.category(), | 758 data_message_stanza.category(), |
758 data_message_stanza.to(), | 759 data_message_stanza.to(), |
759 data_message_stanza.id()); | 760 data_message_stanza.id()); |
760 delegate_->OnMessageSendError(data_message_stanza.category(), | 761 delegate_->OnMessageSendError(data_message_stanza.category(), |
761 send_error_details); | 762 send_error_details); |
762 } | 763 } |
763 | 764 |
764 } // namespace gcm | 765 } // namespace gcm |
OLD | NEW |