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

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

Issue 2315443003: Stop sending serialized SSLStatus to the renderer. (Closed)
Patch Set: self review fix and merge fix 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
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/async_resource_handler.h" 5 #include "content/browser/loader/async_resource_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 ResourceMessageFilter* filter = GetFilter(); 484 ResourceMessageFilter* filter = GetFilter();
485 if (filter) { 485 if (filter) {
486 filter->Send(new ResourceMsg_DataDownloaded( 486 filter->Send(new ResourceMsg_DataDownloaded(
487 GetRequestID(), bytes_downloaded, encoded_data_length)); 487 GetRequestID(), bytes_downloaded, encoded_data_length));
488 } 488 }
489 } 489 }
490 490
491 void AsyncResourceHandler::OnResponseCompleted( 491 void AsyncResourceHandler::OnResponseCompleted(
492 const net::URLRequestStatus& status, 492 const net::URLRequestStatus& status,
493 const std::string& security_info,
494 bool* defer) { 493 bool* defer) {
495 const ResourceRequestInfoImpl* info = GetRequestInfo(); 494 const ResourceRequestInfoImpl* info = GetRequestInfo();
496 if (!info->filter()) 495 if (!info->filter())
497 return; 496 return;
498 497
499 // If we crash here, figure out what URL the renderer was requesting. 498 // If we crash here, figure out what URL the renderer was requesting.
500 // http://crbug.com/107692 499 // http://crbug.com/107692
501 char url_buf[128]; 500 char url_buf[128];
502 base::strlcpy(url_buf, request()->url().spec().c_str(), arraysize(url_buf)); 501 base::strlcpy(url_buf, request()->url().spec().c_str(), arraysize(url_buf));
503 base::debug::Alias(url_buf); 502 base::debug::Alias(url_buf);
(...skipping 12 matching lines...) Expand all
516 DCHECK(status.status() != net::URLRequestStatus::IO_PENDING); 515 DCHECK(status.status() != net::URLRequestStatus::IO_PENDING);
517 // If this check fails, then we're in an inconsistent state because all 516 // If this check fails, then we're in an inconsistent state because all
518 // requests ignored by the handler should be canceled (which should result in 517 // requests ignored by the handler should be canceled (which should result in
519 // the ERR_ABORTED error code). 518 // the ERR_ABORTED error code).
520 DCHECK(!was_ignored_by_handler || error_code == net::ERR_ABORTED); 519 DCHECK(!was_ignored_by_handler || error_code == net::ERR_ABORTED);
521 520
522 ResourceRequestCompletionStatus request_complete_data; 521 ResourceRequestCompletionStatus request_complete_data;
523 request_complete_data.error_code = error_code; 522 request_complete_data.error_code = error_code;
524 request_complete_data.was_ignored_by_handler = was_ignored_by_handler; 523 request_complete_data.was_ignored_by_handler = was_ignored_by_handler;
525 request_complete_data.exists_in_cache = request()->response_info().was_cached; 524 request_complete_data.exists_in_cache = request()->response_info().was_cached;
526 request_complete_data.security_info = security_info;
527 request_complete_data.completion_time = TimeTicks::Now(); 525 request_complete_data.completion_time = TimeTicks::Now();
528 request_complete_data.encoded_data_length = 526 request_complete_data.encoded_data_length =
529 request()->GetTotalReceivedBytes(); 527 request()->GetTotalReceivedBytes();
530 info->filter()->Send( 528 info->filter()->Send(
531 new ResourceMsg_RequestComplete(GetRequestID(), request_complete_data)); 529 new ResourceMsg_RequestComplete(GetRequestID(), request_complete_data));
532 530
533 if (status.is_success()) 531 if (status.is_success())
534 RecordHistogram(); 532 RecordHistogram();
535 } 533 }
536 534
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } else { 598 } else {
601 UMA_HISTOGRAM_CUSTOM_COUNTS( 599 UMA_HISTOGRAM_CUSTOM_COUNTS(
602 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", 600 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB",
603 elapsed_time, 1, 100000, 100); 601 elapsed_time, 1, 100000, 100);
604 } 602 }
605 603
606 inlining_helper_->RecordHistogram(elapsed_time); 604 inlining_helper_->RecordHistogram(elapsed_time);
607 } 605 }
608 606
609 } // namespace content 607 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/async_resource_handler.h ('k') | content/browser/loader/cross_site_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698