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

Side by Side Diff: net/test/url_request/url_request_failed_job.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/test/url_request/url_request_failed_job.h" 5 #include "net/test/url_request/url_request_failed_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return AddUrlHandlerForHostname(kMockHostname); 129 return AddUrlHandlerForHostname(kMockHostname);
130 } 130 }
131 131
132 // static 132 // static
133 void URLRequestFailedJob::AddUrlHandlerForHostname( 133 void URLRequestFailedJob::AddUrlHandlerForHostname(
134 const std::string& hostname) { 134 const std::string& hostname) {
135 URLRequestFilter* filter = URLRequestFilter::GetInstance(); 135 URLRequestFilter* filter = URLRequestFilter::GetInstance();
136 // Add |hostname| to URLRequestFilter for HTTP and HTTPS. 136 // Add |hostname| to URLRequestFilter for HTTP and HTTPS.
137 filter->AddHostnameInterceptor( 137 filter->AddHostnameInterceptor(
138 "http", hostname, 138 "http", hostname,
139 scoped_ptr<URLRequestInterceptor>(new MockJobInterceptor())); 139 std::unique_ptr<URLRequestInterceptor>(new MockJobInterceptor()));
140 filter->AddHostnameInterceptor( 140 filter->AddHostnameInterceptor(
141 "https", hostname, 141 "https", hostname,
142 scoped_ptr<URLRequestInterceptor>(new MockJobInterceptor())); 142 std::unique_ptr<URLRequestInterceptor>(new MockJobInterceptor()));
143 } 143 }
144 144
145 // static 145 // static
146 GURL URLRequestFailedJob::GetMockHttpUrl(int net_error) { 146 GURL URLRequestFailedJob::GetMockHttpUrl(int net_error) {
147 return GetMockHttpUrlForHostname(net_error, kMockHostname); 147 return GetMockHttpUrlForHostname(net_error, kMockHostname);
148 } 148 }
149 149
150 // static 150 // static
151 GURL URLRequestFailedJob::GetMockHttpsUrl(int net_error) { 151 GURL URLRequestFailedJob::GetMockHttpsUrl(int net_error) {
152 return GetMockHttpsUrlForHostname(net_error, kMockHostname); 152 return GetMockHttpsUrlForHostname(net_error, kMockHostname);
(...skipping 28 matching lines...) Expand all
181 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, net_error_)); 181 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, net_error_));
182 return; 182 return;
183 } 183 }
184 return; 184 return;
185 } 185 }
186 response_info_.headers = new net::HttpResponseHeaders("HTTP/1.1 200 OK"); 186 response_info_.headers = new net::HttpResponseHeaders("HTTP/1.1 200 OK");
187 NotifyHeadersComplete(); 187 NotifyHeadersComplete();
188 } 188 }
189 189
190 } // namespace net 190 } // namespace net
OLDNEW
« no previous file with comments | « net/test/url_request/ssl_certificate_error_job.cc ('k') | net/test/url_request/url_request_mock_data_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698