OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer_host/resource_dispatcher_host.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1770 info->resource_type() == ResourceType::MAIN_FRAME && | 1770 info->resource_type() == ResourceType::MAIN_FRAME && |
1771 request->status().error() != net::ERR_ABORTED) { | 1771 request->status().error() != net::ERR_ABORTED) { |
1772 // This enumeration has "2" appended to its name to distinguish it from | 1772 // This enumeration has "2" appended to its name to distinguish it from |
1773 // its original version. We changed the buckets at one point (added | 1773 // its original version. We changed the buckets at one point (added |
1774 // guard buckets by using CustomHistogram::ArrayToCustomRanges). | 1774 // guard buckets by using CustomHistogram::ArrayToCustomRanges). |
1775 UMA_HISTOGRAM_CUSTOM_ENUMERATION( | 1775 UMA_HISTOGRAM_CUSTOM_ENUMERATION( |
1776 "Net.ErrorCodesForMainFrame2", | 1776 "Net.ErrorCodesForMainFrame2", |
1777 -request->status().error(), | 1777 -request->status().error(), |
1778 base::CustomHistogram::ArrayToCustomRanges( | 1778 base::CustomHistogram::ArrayToCustomRanges( |
1779 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); | 1779 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); |
| 1780 |
| 1781 if (request->url().SchemeIsSecure() && |
| 1782 request->url().host() == "www.google.com") { |
| 1783 UMA_HISTOGRAM_CUSTOM_ENUMERATION( |
| 1784 "Net.ErrorCodesForHTTPSGoogleMainFrame", |
| 1785 -request->status().error(), |
| 1786 base::CustomHistogram::ArrayToCustomRanges( |
| 1787 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); |
| 1788 } |
1780 } | 1789 } |
1781 | 1790 |
1782 std::string security_info; | 1791 std::string security_info; |
1783 const net::SSLInfo& ssl_info = request->ssl_info(); | 1792 const net::SSLInfo& ssl_info = request->ssl_info(); |
1784 if (ssl_info.cert != NULL) { | 1793 if (ssl_info.cert != NULL) { |
1785 int cert_id = CertStore::GetInstance()->StoreCert(ssl_info.cert, | 1794 int cert_id = CertStore::GetInstance()->StoreCert(ssl_info.cert, |
1786 info->child_id()); | 1795 info->child_id()); |
1787 security_info = SSLManager::SerializeSecurityInfo( | 1796 security_info = SSLManager::SerializeSecurityInfo( |
1788 cert_id, ssl_info.cert_status, ssl_info.security_bits, | 1797 cert_id, ssl_info.cert_status, ssl_info.security_bits, |
1789 ssl_info.connection_status); | 1798 ssl_info.connection_status); |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2162 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; | 2171 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; |
2163 } | 2172 } |
2164 | 2173 |
2165 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { | 2174 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { |
2166 return allow_cross_origin_auth_prompt_; | 2175 return allow_cross_origin_auth_prompt_; |
2167 } | 2176 } |
2168 | 2177 |
2169 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2178 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
2170 allow_cross_origin_auth_prompt_ = value; | 2179 allow_cross_origin_auth_prompt_ = value; |
2171 } | 2180 } |
OLD | NEW |