OLD | NEW |
---|---|
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 "content/test/net/url_request_mock_http_job.h" | 5 #include "content/test/net/url_request_mock_http_job.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 new ProtocolHandler(file, true)); | 116 new ProtocolHandler(file, true)); |
117 } | 117 } |
118 | 118 |
119 URLRequestMockHTTPJob::URLRequestMockHTTPJob( | 119 URLRequestMockHTTPJob::URLRequestMockHTTPJob( |
120 net::URLRequest* request, net::NetworkDelegate* network_delegate, | 120 net::URLRequest* request, net::NetworkDelegate* network_delegate, |
121 const base::FilePath& file_path) | 121 const base::FilePath& file_path) |
122 : net::URLRequestFileJob( | 122 : net::URLRequestFileJob( |
123 request, network_delegate, file_path, | 123 request, network_delegate, file_path, |
124 content::BrowserThread::GetBlockingPool()-> | 124 content::BrowserThread::GetBlockingPool()-> |
125 GetTaskRunnerWithShutdownBehavior( | 125 GetTaskRunnerWithShutdownBehavior( |
126 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)) {} | 126 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)) { |
127 } | |
Randy Smith (Not in Mondays)
2014/02/26 00:07:38
Why?
Elly Fong-Jones
2014/03/03 19:31:07
Mistakes were made.
| |
127 | 128 |
128 URLRequestMockHTTPJob::~URLRequestMockHTTPJob() { } | 129 URLRequestMockHTTPJob::~URLRequestMockHTTPJob() { } |
129 | 130 |
130 // Public virtual version. | 131 // Public virtual version. |
131 void URLRequestMockHTTPJob::GetResponseInfo(net::HttpResponseInfo* info) { | 132 void URLRequestMockHTTPJob::GetResponseInfo(net::HttpResponseInfo* info) { |
132 // Forward to private const version. | 133 // Forward to private const version. |
133 GetResponseInfoConst(info); | 134 GetResponseInfoConst(info); |
134 } | 135 } |
135 | 136 |
136 bool URLRequestMockHTTPJob::IsRedirectResponse(GURL* location, | 137 bool URLRequestMockHTTPJob::IsRedirectResponse(GURL* location, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 return net::URLRequestJob::GetResponseCode(); | 176 return net::URLRequestJob::GetResponseCode(); |
176 } | 177 } |
177 | 178 |
178 bool URLRequestMockHTTPJob::GetCharset(std::string* charset) { | 179 bool URLRequestMockHTTPJob::GetCharset(std::string* charset) { |
179 net::HttpResponseInfo info; | 180 net::HttpResponseInfo info; |
180 GetResponseInfo(&info); | 181 GetResponseInfo(&info); |
181 return info.headers.get() && info.headers->GetCharset(charset); | 182 return info.headers.get() && info.headers->GetCharset(charset); |
182 } | 183 } |
183 | 184 |
184 } // namespace content | 185 } // namespace content |
OLD | NEW |