Chromium Code Reviews

Side by Side Diff: net/http/http_network_transaction.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_network_transaction_unittest.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 #include "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 72 matching lines...)
83 alternate_protocol_values.push_back(alternate_protocol_str); 83 alternate_protocol_values.push_back(alternate_protocol_str);
84 } 84 }
85 85
86 session->http_stream_factory()->ProcessAlternateProtocol( 86 session->http_stream_factory()->ProcessAlternateProtocol(
87 session->http_server_properties(), 87 session->http_server_properties(),
88 alternate_protocol_values, 88 alternate_protocol_values,
89 http_host_port_pair, 89 http_host_port_pair,
90 *session); 90 *session);
91 } 91 }
92 92
93 // Returns true if |error| is a client certificate authentication error.
94 bool IsClientCertificateError(int error) {
95 switch (error) {
96 case ERR_BAD_SSL_CLIENT_AUTH_CERT:
97 case ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED:
98 case ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY:
99 case ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED:
100 return true;
101 default:
102 return false;
103 }
104 }
105
106 base::Value* NetLogSSLVersionFallbackCallback( 93 base::Value* NetLogSSLVersionFallbackCallback(
107 const GURL* url, 94 const GURL* url,
108 int net_error, 95 int net_error,
109 uint16 version_before, 96 uint16 version_before,
110 uint16 version_after, 97 uint16 version_after,
111 NetLog::LogLevel /* log_level */) { 98 NetLog::LogLevel /* log_level */) {
112 base::DictionaryValue* dict = new base::DictionaryValue(); 99 base::DictionaryValue* dict = new base::DictionaryValue();
113 dict->SetString("host_and_port", GetHostAndPort(*url)); 100 dict->SetString("host_and_port", GetHostAndPort(*url));
114 dict->SetInteger("net_error", net_error); 101 dict->SetInteger("net_error", net_error);
115 dict->SetInteger("version_before", version_before); 102 dict->SetInteger("version_before", version_before);
(...skipping 1406 matching lines...)
1522 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1509 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1523 state); 1510 state);
1524 break; 1511 break;
1525 } 1512 }
1526 return description; 1513 return description;
1527 } 1514 }
1528 1515
1529 #undef STATE_CASE 1516 #undef STATE_CASE
1530 1517
1531 } // namespace net 1518 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine