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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 1275743005: Attach security info to redirect responses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 delegate_->DidReceiveRedirect(this, redirect_info.new_url); 283 delegate_->DidReceiveRedirect(this, redirect_info.new_url);
284 284
285 if (delegate_->HandleExternalProtocol(this, redirect_info.new_url)) { 285 if (delegate_->HandleExternalProtocol(this, redirect_info.new_url)) {
286 // The request is complete so we can remove it. 286 // The request is complete so we can remove it.
287 CancelAndIgnore(); 287 CancelAndIgnore();
288 return; 288 return;
289 } 289 }
290 290
291 scoped_refptr<ResourceResponse> response(new ResourceResponse()); 291 scoped_refptr<ResourceResponse> response(new ResourceResponse());
292 PopulateResourceResponse(info, request_.get(), response.get()); 292 PopulateResourceResponse(info, request_.get(), response.get());
293 if (request_->ssl_info().cert.get()) {
294 SSLStatus ssl_status;
295 GetSSLStatusForRequest(request_->url(), request_->ssl_info(),
296 info->GetChildID(), &ssl_status);
297 response->head.security_info = SerializeSecurityInfo(ssl_status);
298 }
davidben 2015/08/11 15:15:59 Why not put this code into PopulateResourceRespons
estark 2015/08/12 07:02:25 Done.
293 if (!handler_->OnRequestRedirected(redirect_info, response.get(), defer)) { 299 if (!handler_->OnRequestRedirected(redirect_info, response.get(), defer)) {
294 Cancel(); 300 Cancel();
295 } else if (*defer) { 301 } else if (*defer) {
296 deferred_stage_ = DEFERRED_REDIRECT; // Follow redirect when resumed. 302 deferred_stage_ = DEFERRED_REDIRECT; // Follow redirect when resumed.
297 } 303 }
298 } 304 }
299 305
300 void ResourceLoader::OnAuthRequired(net::URLRequest* unused, 306 void ResourceLoader::OnAuthRequired(net::URLRequest* unused,
301 net::AuthChallengeInfo* auth_info) { 307 net::AuthChallengeInfo* auth_info) {
302 DCHECK_EQ(request_.get(), unused); 308 DCHECK_EQ(request_.get(), unused);
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 case net::URLRequestStatus::FAILED: 770 case net::URLRequestStatus::FAILED:
765 status = STATUS_UNDEFINED; 771 status = STATUS_UNDEFINED;
766 break; 772 break;
767 } 773 }
768 774
769 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 775 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
770 } 776 }
771 } 777 }
772 778
773 } // namespace content 779 } // namespace content
OLDNEW
« 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