Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: google_apis/gcm/engine/registration_request.cc

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698