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

Side by Side Diff: components/domain_reliability/uploader.cc

Issue 1851933002: Convert //url to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixup 7 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
« no previous file with comments | « components/domain_reliability/uploader.h ('k') | components/ntp_snippets/ntp_snippet.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/domain_reliability/uploader.h" 5 #include "components/domain_reliability/uploader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/metrics/sparse_histogram.h" 9 #include "base/metrics/sparse_histogram.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 UploadCallbackMap upload_callbacks_; 157 UploadCallbackMap upload_callbacks_;
158 bool discard_uploads_; 158 bool discard_uploads_;
159 }; 159 };
160 160
161 } // namespace 161 } // namespace
162 162
163 DomainReliabilityUploader::DomainReliabilityUploader() {} 163 DomainReliabilityUploader::DomainReliabilityUploader() {}
164 DomainReliabilityUploader::~DomainReliabilityUploader() {} 164 DomainReliabilityUploader::~DomainReliabilityUploader() {}
165 165
166 // static 166 // static
167 scoped_ptr<DomainReliabilityUploader> DomainReliabilityUploader::Create( 167 std::unique_ptr<DomainReliabilityUploader> DomainReliabilityUploader::Create(
168 MockableTime* time, 168 MockableTime* time,
169 const scoped_refptr<net::URLRequestContextGetter>& 169 const scoped_refptr<net::URLRequestContextGetter>&
170 url_request_context_getter) { 170 url_request_context_getter) {
171 return scoped_ptr<DomainReliabilityUploader>( 171 return std::unique_ptr<DomainReliabilityUploader>(
172 new DomainReliabilityUploaderImpl(time, url_request_context_getter)); 172 new DomainReliabilityUploaderImpl(time, url_request_context_getter));
173 } 173 }
174 174
175 // static 175 // static
176 int DomainReliabilityUploader::GetURLRequestUploadDepth( 176 int DomainReliabilityUploader::GetURLRequestUploadDepth(
177 const net::URLRequest& request) { 177 const net::URLRequest& request) {
178 UploadUserData* data = static_cast<UploadUserData*>( 178 UploadUserData* data = static_cast<UploadUserData*>(
179 request.GetUserData(UploadUserData::kUserDataKey)); 179 request.GetUserData(UploadUserData::kUserDataKey));
180 if (!data) 180 if (!data)
181 return 0; 181 return 0;
182 return data->depth(); 182 return data->depth();
183 } 183 }
184 184
185 } // namespace domain_reliability 185 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « components/domain_reliability/uploader.h ('k') | components/ntp_snippets/ntp_snippet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698