| 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 #include "google_apis/gcm/engine/registration_request.h" | 5 #include "google_apis/gcm/engine/registration_request.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 RegistrationRequest::RequestInfo::~RequestInfo() {} | 84 RegistrationRequest::RequestInfo::~RequestInfo() {} |
| 85 | 85 |
| 86 RegistrationRequest::CustomRequestHandler::CustomRequestHandler() {} | 86 RegistrationRequest::CustomRequestHandler::CustomRequestHandler() {} |
| 87 | 87 |
| 88 RegistrationRequest::CustomRequestHandler::~CustomRequestHandler() {} | 88 RegistrationRequest::CustomRequestHandler::~CustomRequestHandler() {} |
| 89 | 89 |
| 90 RegistrationRequest::RegistrationRequest( | 90 RegistrationRequest::RegistrationRequest( |
| 91 const GURL& registration_url, | 91 const GURL& registration_url, |
| 92 const RequestInfo& request_info, | 92 const RequestInfo& request_info, |
| 93 scoped_ptr<CustomRequestHandler> custom_request_handler, | 93 std::unique_ptr<CustomRequestHandler> custom_request_handler, |
| 94 const net::BackoffEntry::Policy& backoff_policy, | 94 const net::BackoffEntry::Policy& backoff_policy, |
| 95 const RegistrationCallback& callback, | 95 const RegistrationCallback& callback, |
| 96 int max_retry_count, | 96 int max_retry_count, |
| 97 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 97 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
| 98 GCMStatsRecorder* recorder, | 98 GCMStatsRecorder* recorder, |
| 99 const std::string& source_to_record) | 99 const std::string& source_to_record) |
| 100 : callback_(callback), | 100 : callback_(callback), |
| 101 request_info_(request_info), | 101 request_info_(request_info), |
| 102 custom_request_handler_(std::move(custom_request_handler)), | 102 custom_request_handler_(std::move(custom_request_handler)), |
| 103 registration_url_(registration_url), | 103 registration_url_(registration_url), |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // Only REACHED_MAX_RETRIES is reported because the function will skip | 249 // Only REACHED_MAX_RETRIES is reported because the function will skip |
| 250 // reporting count and time when status is not SUCCESS. | 250 // reporting count and time when status is not SUCCESS. |
| 251 DCHECK(custom_request_handler_.get()); | 251 DCHECK(custom_request_handler_.get()); |
| 252 custom_request_handler_->ReportUMAs(status, 0, base::TimeDelta()); | 252 custom_request_handler_->ReportUMAs(status, 0, base::TimeDelta()); |
| 253 } | 253 } |
| 254 | 254 |
| 255 callback_.Run(status, token); | 255 callback_.Run(status, token); |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace gcm | 258 } // namespace gcm |
| OLD | NEW |