| OLD | NEW |
| 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 "content/child/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 context_->SetDefersLoading(value); | 1160 context_->SetDefersLoading(value); |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, | 1163 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, |
| 1164 int intra_priority_value) { | 1164 int intra_priority_value) { |
| 1165 context_->DidChangePriority(new_priority, intra_priority_value); | 1165 context_->DidChangePriority(new_priority, intra_priority_value); |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 void WebURLLoaderImpl::setLoadingTaskRunner( | 1168 void WebURLLoaderImpl::setLoadingTaskRunner( |
| 1169 blink::WebTaskRunner* loading_task_runner) { | 1169 blink::WebTaskRunner* loading_task_runner) { |
| 1170 context_->SetTaskRunner(loading_task_runner->taskRunner()); | 1170 context_->SetTaskRunner(loading_task_runner->toSingleThreadTaskRunner()); |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 // This function is implemented here because it uses net functions. it is | 1173 // This function is implemented here because it uses net functions. it is |
| 1174 // tested in | 1174 // tested in |
| 1175 // third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp. | 1175 // third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp. |
| 1176 bool WebURLLoaderImpl::ParseMultipartHeadersFromBody( | 1176 bool WebURLLoaderImpl::ParseMultipartHeadersFromBody( |
| 1177 const char* bytes, | 1177 const char* bytes, |
| 1178 size_t size, | 1178 size_t size, |
| 1179 blink::WebURLResponse* response, | 1179 blink::WebURLResponse* response, |
| 1180 size_t* end) { | 1180 size_t* end) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 response->clearHTTPHeaderField(webStringName); | 1212 response->clearHTTPHeaderField(webStringName); |
| 1213 while (response_headers->EnumerateHeader(&iterator, name, &value)) { | 1213 while (response_headers->EnumerateHeader(&iterator, name, &value)) { |
| 1214 response->addHTTPHeaderField(webStringName, | 1214 response->addHTTPHeaderField(webStringName, |
| 1215 WebString::fromLatin1(value)); | 1215 WebString::fromLatin1(value)); |
| 1216 } | 1216 } |
| 1217 } | 1217 } |
| 1218 return true; | 1218 return true; |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 } // namespace content | 1221 } // namespace content |
| OLD | NEW |