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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1183723006: Make ResourceDispatcherHostImpl::DidReceiveResponse less repetitive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-net
Patch Set: Created 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index ade6e5d1648e01c3304f968789c526f469e63511..f8d9e448c9785944341af840907f493ff5c055a8 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -819,10 +819,10 @@ void ResourceDispatcherHostImpl::DidReceiveRedirect(ResourceLoader* loader,
void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) {
ResourceRequestInfoImpl* info = loader->GetRequestInfo();
-
- if (loader->request()->was_fetched_via_proxy() &&
- loader->request()->was_fetched_via_spdy() &&
- loader->request()->url().SchemeIs(url::kHttpScheme)) {
+ net::URLRequest* request = loader->request();
+ if (request->was_fetched_via_proxy() &&
+ request->was_fetched_via_spdy() &&
+ request->url().SchemeIs(url::kHttpScheme)) {
scheduler_->OnReceivedSpdyProxiedHttpResponse(
info->GetChildID(), info->GetRouteID());
}
@@ -833,8 +833,8 @@ void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) {
// Notify the observers on the UI thread.
scoped_ptr<ResourceRequestDetails> detail(new ResourceRequestDetails(
- loader->request(),
- GetCertID(loader->request(), info->GetChildID())));
+ request,
+ GetCertID(request, info->GetChildID())));
mmenke 2015/06/18 14:47:15 optional: Could merge this with the above line, n
Adam Rice 2015/06/19 07:00:23 Done.
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698