Chromium Code Reviews| 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 #include "net/http/http_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 879 // client certificate during the initial handshake. | 879 // client certificate during the initial handshake. |
| 880 // http://crbug.com/59292 | 880 // http://crbug.com/59292 |
| 881 ssl_config->false_start_enabled = false; | 881 ssl_config->false_start_enabled = false; |
| 882 } | 882 } |
| 883 | 883 |
| 884 UMA_HISTOGRAM_ENUMERATION("Net.ConnectionUsedSSLv3Fallback", | 884 UMA_HISTOGRAM_ENUMERATION("Net.ConnectionUsedSSLv3Fallback", |
| 885 static_cast<int>(ssl_config->ssl3_fallback), 2); | 885 static_cast<int>(ssl_config->ssl3_fallback), 2); |
| 886 | 886 |
| 887 if (request_info_.load_flags & LOAD_VERIFY_EV_CERT) | 887 if (request_info_.load_flags & LOAD_VERIFY_EV_CERT) |
| 888 ssl_config->verify_ev_cert = true; | 888 ssl_config->verify_ev_cert = true; |
| 889 | |
| 890 if (proxy_info_.proxy_server().scheme() == ProxyServer::SCHEME_HTTP || | |
| 891 proxy_info_.proxy_server().scheme() == ProxyServer::SCHEME_HTTPS) { | |
| 892 ssl_config->mitm_proxies_allowed = true; | |
| 893 } | |
|
wtc
2011/04/05 17:20:03
Given this code to allow MITM proxies whenever a p
agl
2011/04/05 19:55:41
Indeed.
| |
| 894 } | 889 } |
| 895 | 890 |
| 896 | 891 |
| 897 int HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError(int error) { | 892 int HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError(int error) { |
| 898 DCHECK(!pac_request_); | 893 DCHECK(!pac_request_); |
| 899 | 894 |
| 900 // A failure to resolve the hostname or any error related to establishing a | 895 // A failure to resolve the hostname or any error related to establishing a |
| 901 // TCP connection could be grounds for trying a new proxy configuration. | 896 // TCP connection could be grounds for trying a new proxy configuration. |
| 902 // | 897 // |
| 903 // Why do this when a hostname cannot be resolved? Some URLs only make sense | 898 // Why do this when a hostname cannot be resolved? Some URLs only make sense |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1031 bool HttpStreamFactoryImpl::Job::IsPreconnecting() const { | 1026 bool HttpStreamFactoryImpl::Job::IsPreconnecting() const { |
| 1032 DCHECK_GE(num_streams_, 0); | 1027 DCHECK_GE(num_streams_, 0); |
| 1033 return num_streams_ > 0; | 1028 return num_streams_ > 0; |
| 1034 } | 1029 } |
| 1035 | 1030 |
| 1036 bool HttpStreamFactoryImpl::Job::IsOrphaned() const { | 1031 bool HttpStreamFactoryImpl::Job::IsOrphaned() const { |
| 1037 return !IsPreconnecting() && !request_; | 1032 return !IsPreconnecting() && !request_; |
| 1038 } | 1033 } |
| 1039 | 1034 |
| 1040 } // namespace net | 1035 } // namespace net |
| OLD | NEW |