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

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

Issue 1101173004: Switch remaining functions from SchemeIsSecure() to SchemeIsCryptographic(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | content/browser/ssl/ssl_policy.cc » ('j') | 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 ResourceRequestInfo* info = loader->GetRequestInfo(); 854 ResourceRequestInfo* info = loader->GetRequestInfo();
855 855
856 // Record final result of all resource loads. 856 // Record final result of all resource loads.
857 if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME) { 857 if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME) {
858 // This enumeration has "3" appended to its name to distinguish it from 858 // This enumeration has "3" appended to its name to distinguish it from
859 // older versions. 859 // older versions.
860 UMA_HISTOGRAM_SPARSE_SLOWLY( 860 UMA_HISTOGRAM_SPARSE_SLOWLY(
861 "Net.ErrorCodesForMainFrame3", 861 "Net.ErrorCodesForMainFrame3",
862 -loader->request()->status().error()); 862 -loader->request()->status().error());
863 863
864 if (loader->request()->url().SchemeIsSecure()) { 864 if (loader->request()->url().SchemeIsCryptographic()) {
865 if (loader->request()->url().host() == "www.google.com") { 865 if (loader->request()->url().host() == "www.google.com") {
866 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.ErrorCodesForHTTPSGoogleMainFrame2", 866 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.ErrorCodesForHTTPSGoogleMainFrame2",
867 -loader->request()->status().error()); 867 -loader->request()->status().error());
868 } 868 }
869 869
870 int num_valid_scts = std::count_if( 870 int num_valid_scts = std::count_if(
871 loader->request()->ssl_info().signed_certificate_timestamps.begin(), 871 loader->request()->ssl_info().signed_certificate_timestamps.begin(),
872 loader->request()->ssl_info().signed_certificate_timestamps.end(), 872 loader->request()->ssl_info().signed_certificate_timestamps.end(),
873 IsValidatedSCT); 873 IsValidatedSCT);
874 UMA_HISTOGRAM_COUNTS_100( 874 UMA_HISTOGRAM_COUNTS_100(
875 "Net.CertificateTransparency.MainFrameValidSCTCount", num_valid_scts); 875 "Net.CertificateTransparency.MainFrameValidSCTCount", num_valid_scts);
876 } 876 }
877 } else { 877 } else {
878 if (info->GetResourceType() == RESOURCE_TYPE_IMAGE) { 878 if (info->GetResourceType() == RESOURCE_TYPE_IMAGE) {
879 UMA_HISTOGRAM_SPARSE_SLOWLY( 879 UMA_HISTOGRAM_SPARSE_SLOWLY(
880 "Net.ErrorCodesForImages", 880 "Net.ErrorCodesForImages",
881 -loader->request()->status().error()); 881 -loader->request()->status().error());
882 } 882 }
883 // This enumeration has "2" appended to distinguish it from older versions. 883 // This enumeration has "2" appended to distinguish it from older versions.
884 UMA_HISTOGRAM_SPARSE_SLOWLY( 884 UMA_HISTOGRAM_SPARSE_SLOWLY(
885 "Net.ErrorCodesForSubresources2", 885 "Net.ErrorCodesForSubresources2",
886 -loader->request()->status().error()); 886 -loader->request()->status().error());
887 } 887 }
888 888
889 if (loader->request()->url().SchemeIsSecure()) { 889 if (loader->request()->url().SchemeIsCryptographic()) {
890 RecordCertificateHistograms(loader->request()->ssl_info(), 890 RecordCertificateHistograms(loader->request()->ssl_info(),
891 info->GetResourceType()); 891 info->GetResourceType());
892 } 892 }
893 893
894 if (delegate_) 894 if (delegate_)
895 delegate_->RequestComplete(loader->request()); 895 delegate_->RequestComplete(loader->request());
896 896
897 // Destroy the ResourceLoader. 897 // Destroy the ResourceLoader.
898 RemovePendingRequest(info->GetChildID(), info->GetRequestID()); 898 RemovePendingRequest(info->GetChildID(), info->GetRequestID());
899 } 899 }
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 2349
2350 // Add a flag to selectively bypass the data reduction proxy if the resource 2350 // Add a flag to selectively bypass the data reduction proxy if the resource
2351 // type is not an image. 2351 // type is not an image.
2352 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2352 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2353 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2353 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2354 2354
2355 return load_flags; 2355 return load_flags;
2356 } 2356 }
2357 2357
2358 } // namespace content 2358 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698