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

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

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_hanging_read_job.h" 5 #include "net/test/url_request/url_request_hanging_read_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void URLRequestHangingReadJob::StartAsync() { 94 void URLRequestHangingReadJob::StartAsync() {
95 set_expected_content_size(content_length_); 95 set_expected_content_size(content_length_);
96 NotifyHeadersComplete(); 96 NotifyHeadersComplete();
97 } 97 }
98 98
99 // static 99 // static
100 void URLRequestHangingReadJob::AddUrlHandler() { 100 void URLRequestHangingReadJob::AddUrlHandler() {
101 // Add |hostname| to URLRequestFilter for HTTP and HTTPS. 101 // Add |hostname| to URLRequestFilter for HTTP and HTTPS.
102 URLRequestFilter* filter = URLRequestFilter::GetInstance(); 102 URLRequestFilter* filter = URLRequestFilter::GetInstance();
103 filter->AddHostnameInterceptor("http", kMockHostname, 103 filter->AddHostnameInterceptor("http", kMockHostname,
104 base::WrapUnique(new MockJobInterceptor())); 104 base::MakeUnique<MockJobInterceptor>());
105 filter->AddHostnameInterceptor("https", kMockHostname, 105 filter->AddHostnameInterceptor("https", kMockHostname,
106 base::WrapUnique(new MockJobInterceptor())); 106 base::MakeUnique<MockJobInterceptor>());
107 } 107 }
108 108
109 // static 109 // static
110 GURL URLRequestHangingReadJob::GetMockHttpUrl() { 110 GURL URLRequestHangingReadJob::GetMockHttpUrl() {
111 return GetMockUrl("http", kMockHostname); 111 return GetMockUrl("http", kMockHostname);
112 } 112 }
113 113
114 // static 114 // static
115 GURL URLRequestHangingReadJob::GetMockHttpsUrl() { 115 GURL URLRequestHangingReadJob::GetMockHttpsUrl() {
116 return GetMockUrl("https", kMockHostname); 116 return GetMockUrl("https", kMockHostname);
117 } 117 }
118 118
119 } // namespace net 119 } // namespace net
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/request_handler_util.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