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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host.cc

Issue 7846007: net: Rename URLRequestStatus::os_error_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix os_error_code Created 9 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 | Annotate | Revision Log
OLDNEW
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 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 } 1735 }
1736 1736
1737 void ResourceDispatcherHost::OnResponseCompleted(net::URLRequest* request) { 1737 void ResourceDispatcherHost::OnResponseCompleted(net::URLRequest* request) {
1738 VLOG(1) << "OnResponseCompleted: " << request->url().spec(); 1738 VLOG(1) << "OnResponseCompleted: " << request->url().spec();
1739 ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); 1739 ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
1740 1740
1741 // If the load for a main frame has failed, track it in a histogram, 1741 // If the load for a main frame has failed, track it in a histogram,
1742 // since it will probably cause the user to see an error page. 1742 // since it will probably cause the user to see an error page.
1743 if (!request->status().is_success() && 1743 if (!request->status().is_success() &&
1744 info->resource_type() == ResourceType::MAIN_FRAME && 1744 info->resource_type() == ResourceType::MAIN_FRAME &&
1745 request->status().os_error() != net::ERR_ABORTED) { 1745 request->status().error() != net::ERR_ABORTED) {
1746 // This enumeration has "2" appended to its name to distinguish it from 1746 // This enumeration has "2" appended to its name to distinguish it from
1747 // its original version. We changed the buckets at one point (added 1747 // its original version. We changed the buckets at one point (added
1748 // guard buckets by using CustomHistogram::ArrayToCustomRanges). 1748 // guard buckets by using CustomHistogram::ArrayToCustomRanges).
1749 UMA_HISTOGRAM_CUSTOM_ENUMERATION( 1749 UMA_HISTOGRAM_CUSTOM_ENUMERATION(
1750 "Net.ErrorCodesForMainFrame2", 1750 "Net.ErrorCodesForMainFrame2",
1751 -request->status().os_error(), 1751 -request->status().error(),
1752 base::CustomHistogram::ArrayToCustomRanges( 1752 base::CustomHistogram::ArrayToCustomRanges(
1753 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); 1753 kAllNetErrorCodes, arraysize(kAllNetErrorCodes)));
1754 } 1754 }
1755 1755
1756 std::string security_info; 1756 std::string security_info;
1757 const net::SSLInfo& ssl_info = request->ssl_info(); 1757 const net::SSLInfo& ssl_info = request->ssl_info();
1758 if (ssl_info.cert != NULL) { 1758 if (ssl_info.cert != NULL) {
1759 int cert_id = CertStore::GetInstance()->StoreCert(ssl_info.cert, 1759 int cert_id = CertStore::GetInstance()->StoreCert(ssl_info.cert,
1760 info->child_id()); 1760 info->child_id());
1761 security_info = SSLManager::SerializeSecurityInfo( 1761 security_info = SSLManager::SerializeSecurityInfo(
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; 2135 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS;
2136 } 2136 }
2137 2137
2138 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { 2138 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() {
2139 return allow_cross_origin_auth_prompt_; 2139 return allow_cross_origin_auth_prompt_;
2140 } 2140 }
2141 2141
2142 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { 2142 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) {
2143 allow_cross_origin_auth_prompt_ = value; 2143 allow_cross_origin_auth_prompt_ = value;
2144 } 2144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698