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

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

Issue 217053010: Revert of Rename PrivateMode enum values: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « net/http/http_request_info.cc ('k') | net/http/http_stream_factory_impl_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_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 bool direct = true; 1085 bool direct = true;
1086 const ProxyServer& proxy_server = proxy_info_.proxy_server(); 1086 const ProxyServer& proxy_server = proxy_info_.proxy_server();
1087 PrivacyMode privacy_mode = request_info_.privacy_mode; 1087 PrivacyMode privacy_mode = request_info_.privacy_mode;
1088 SpdySessionKey spdy_session_key(origin_, proxy_server, privacy_mode); 1088 SpdySessionKey spdy_session_key(origin_, proxy_server, privacy_mode);
1089 if (IsHttpsProxyAndHttpUrl()) { 1089 if (IsHttpsProxyAndHttpUrl()) {
1090 // If we don't have a direct SPDY session, and we're using an HTTPS 1090 // If we don't have a direct SPDY session, and we're using an HTTPS
1091 // proxy, then we might have a SPDY session to the proxy. 1091 // proxy, then we might have a SPDY session to the proxy.
1092 // We never use privacy mode for connection to proxy server. 1092 // We never use privacy mode for connection to proxy server.
1093 spdy_session_key = SpdySessionKey(proxy_server.host_port_pair(), 1093 spdy_session_key = SpdySessionKey(proxy_server.host_port_pair(),
1094 ProxyServer::Direct(), 1094 ProxyServer::Direct(),
1095 PRIVACY_MODE_DISABLED); 1095 kPrivacyModeDisabled);
1096 direct = false; 1096 direct = false;
1097 } 1097 }
1098 1098
1099 base::WeakPtr<SpdySession> spdy_session; 1099 base::WeakPtr<SpdySession> spdy_session;
1100 if (existing_spdy_session_.get()) { 1100 if (existing_spdy_session_.get()) {
1101 // We picked up an existing session, so we don't need our socket. 1101 // We picked up an existing session, so we don't need our socket.
1102 if (connection_->socket()) 1102 if (connection_->socket())
1103 connection_->socket()->Disconnect(); 1103 connection_->socket()->Disconnect();
1104 connection_->Reset(); 1104 connection_->Reset();
1105 std::swap(spdy_session, existing_spdy_session_); 1105 std::swap(spdy_session, existing_spdy_session_);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 host.compare(host.size() - 10, 10, "google.com") == 0 && 1271 host.compare(host.size() - 10, 10, "google.com") == 0 &&
1272 (host.size() == 10 || host[host.size()-11] == '.')) { 1272 (host.size() == 10 || host[host.size()-11] == '.')) {
1273 UMA_HISTOGRAM_ENUMERATION("Net.GoogleConnectionUsedSSLVersionFallback", 1273 UMA_HISTOGRAM_ENUMERATION("Net.GoogleConnectionUsedSSLVersionFallback",
1274 fallback, FALLBACK_MAX); 1274 fallback, FALLBACK_MAX);
1275 } 1275 }
1276 1276
1277 if (request_info_.load_flags & LOAD_VERIFY_EV_CERT) 1277 if (request_info_.load_flags & LOAD_VERIFY_EV_CERT)
1278 ssl_config->verify_ev_cert = true; 1278 ssl_config->verify_ev_cert = true;
1279 1279
1280 // Disable Channel ID if privacy mode is enabled. 1280 // Disable Channel ID if privacy mode is enabled.
1281 if (request_info_.privacy_mode == PRIVACY_MODE_ENABLED) 1281 if (request_info_.privacy_mode == kPrivacyModeEnabled)
1282 ssl_config->channel_id_enabled = false; 1282 ssl_config->channel_id_enabled = false;
1283 } 1283 }
1284 1284
1285 1285
1286 int HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError(int error) { 1286 int HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError(int error) {
1287 DCHECK(!pac_request_); 1287 DCHECK(!pac_request_);
1288 1288
1289 // A failure to resolve the hostname or any error related to establishing a 1289 // A failure to resolve the hostname or any error related to establishing a
1290 // TCP connection could be grounds for trying a new proxy configuration. 1290 // TCP connection could be grounds for trying a new proxy configuration.
1291 // 1291 //
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | 1465 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH |
1466 net::LOAD_IS_DOWNLOAD)) { 1466 net::LOAD_IS_DOWNLOAD)) {
1467 // Avoid pipelining resources that may be streamed for a long time. 1467 // Avoid pipelining resources that may be streamed for a long time.
1468 return false; 1468 return false;
1469 } 1469 }
1470 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( 1470 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining(
1471 *http_pipelining_key_.get()); 1471 *http_pipelining_key_.get());
1472 } 1472 }
1473 1473
1474 } // namespace net 1474 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_request_info.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698