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

Unified Diff: content/child/resource_dispatcher.cc

Issue 2926693002: Make content::ThrottlingURLLoader take a task runner and more efficient. (Closed)
Patch Set: sync & resolve Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/url_loader_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index f97684515fb3edb5d0365158acaf81a06182f06b..8e78c10fcce442aabb45432cbc927950cbed5d13 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -666,11 +666,13 @@ int ResourceDispatcher::StartAsync(
scoped_refptr<base::SingleThreadTaskRunner> task_runner =
loading_task_runner ? loading_task_runner : thread_task_runner_;
std::unique_ptr<URLLoaderClientImpl> client(
- new URLLoaderClientImpl(request_id, this, std::move(task_runner)));
+ new URLLoaderClientImpl(request_id, this, task_runner));
std::unique_ptr<ThrottlingURLLoader> url_loader =
ThrottlingURLLoader::CreateLoaderAndStart(
url_loader_factory, std::move(throttles), routing_id, request_id,
- mojom::kURLLoadOptionNone, std::move(request), client.get());
+ mojom::kURLLoadOptionNone, std::move(request), client.get(),
+ std::move(task_runner));
+ ;
pending_requests_[request_id]->url_loader = std::move(url_loader);
pending_requests_[request_id]->url_loader_client = std::move(client);
} else {
« no previous file with comments | « no previous file | content/child/url_loader_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698