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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 2266443002: Optimize posting of WTF::Closure and improve scheduler test mocks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cut back to just the WTF::Closure fix plus the scheduler test mock refactor. 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp » ('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 "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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 context_->SetDefersLoading(value); 1161 context_->SetDefersLoading(value);
1162 } 1162 }
1163 1163
1164 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, 1164 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority,
1165 int intra_priority_value) { 1165 int intra_priority_value) {
1166 context_->DidChangePriority(new_priority, intra_priority_value); 1166 context_->DidChangePriority(new_priority, intra_priority_value);
1167 } 1167 }
1168 1168
1169 void WebURLLoaderImpl::setLoadingTaskRunner( 1169 void WebURLLoaderImpl::setLoadingTaskRunner(
1170 blink::WebTaskRunner* loading_task_runner) { 1170 blink::WebTaskRunner* loading_task_runner) {
1171 context_->SetTaskRunner(loading_task_runner->taskRunner()); 1171 context_->SetTaskRunner(loading_task_runner->toSingleThreadTaskRunner());
1172 } 1172 }
1173 1173
1174 // This function is implemented here because it uses net functions. it is 1174 // This function is implemented here because it uses net functions. it is
1175 // tested in 1175 // tested in
1176 // third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp. 1176 // third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp.
1177 bool WebURLLoaderImpl::ParseMultipartHeadersFromBody( 1177 bool WebURLLoaderImpl::ParseMultipartHeadersFromBody(
1178 const char* bytes, 1178 const char* bytes,
1179 size_t size, 1179 size_t size,
1180 blink::WebURLResponse* response, 1180 blink::WebURLResponse* response,
1181 size_t* end) { 1181 size_t* end) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 response->clearHTTPHeaderField(webStringName); 1213 response->clearHTTPHeaderField(webStringName);
1214 while (response_headers->EnumerateHeader(&iterator, name, &value)) { 1214 while (response_headers->EnumerateHeader(&iterator, name, &value)) {
1215 response->addHTTPHeaderField(webStringName, 1215 response->addHTTPHeaderField(webStringName,
1216 WebString::fromLatin1(value)); 1216 WebString::fromLatin1(value));
1217 } 1217 }
1218 } 1218 }
1219 return true; 1219 return true;
1220 } 1220 }
1221 1221
1222 } // namespace content 1222 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698