OLD | NEW |
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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 467 |
468 void ResourceLoader::StoreSignedCertificateTimestamps( | 468 void ResourceLoader::StoreSignedCertificateTimestamps( |
469 const net::SignedCertificateTimestampAndStatusList& sct_list, | 469 const net::SignedCertificateTimestampAndStatusList& sct_list, |
470 int process_id, | 470 int process_id, |
471 SignedCertificateTimestampIDStatusList* sct_ids) { | 471 SignedCertificateTimestampIDStatusList* sct_ids) { |
472 SignedCertificateTimestampStore* sct_store( | 472 SignedCertificateTimestampStore* sct_store( |
473 SignedCertificateTimestampStore::GetInstance()); | 473 SignedCertificateTimestampStore::GetInstance()); |
474 | 474 |
475 for (net::SignedCertificateTimestampAndStatusList::const_iterator iter = | 475 for (net::SignedCertificateTimestampAndStatusList::const_iterator iter = |
476 sct_list.begin(); iter != sct_list.end(); ++iter) { | 476 sct_list.begin(); iter != sct_list.end(); ++iter) { |
477 const int sct_id(sct_store->Store(iter->sct_, process_id)); | 477 const int sct_id(sct_store->Store(iter->sct, process_id)); |
478 sct_ids->push_back( | 478 sct_ids->push_back( |
479 SignedCertificateTimestampIDAndStatus(sct_id, iter->status_)); | 479 SignedCertificateTimestampIDAndStatus(sct_id, iter->status)); |
480 } | 480 } |
481 } | 481 } |
482 | 482 |
483 void ResourceLoader::CompleteResponseStarted() { | 483 void ResourceLoader::CompleteResponseStarted() { |
484 ResourceRequestInfoImpl* info = GetRequestInfo(); | 484 ResourceRequestInfoImpl* info = GetRequestInfo(); |
485 | 485 |
486 scoped_refptr<ResourceResponse> response(new ResourceResponse()); | 486 scoped_refptr<ResourceResponse> response(new ResourceResponse()); |
487 PopulateResourceResponse(request_.get(), response.get()); | 487 PopulateResourceResponse(request_.get(), response.get()); |
488 | 488 |
489 if (request_->ssl_info().cert.get()) { | 489 if (request_->ssl_info().cert.get()) { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 case net::URLRequestStatus::FAILED: | 659 case net::URLRequestStatus::FAILED: |
660 status = STATUS_UNDEFINED; | 660 status = STATUS_UNDEFINED; |
661 break; | 661 break; |
662 } | 662 } |
663 | 663 |
664 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 664 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
665 } | 665 } |
666 } | 666 } |
667 | 667 |
668 } // namespace content | 668 } // namespace content |
OLD | NEW |