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

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

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove accidental include from merge Created 6 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
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_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return ssl_params_->GetDirectConnectionParams()->destination(); 61 return ssl_params_->GetDirectConnectionParams()->destination();
62 } else { 62 } else {
63 return transport_params_->destination(); 63 return transport_params_->destination();
64 } 64 }
65 } 65 }
66 66
67 HttpProxySocketParams::~HttpProxySocketParams() {} 67 HttpProxySocketParams::~HttpProxySocketParams() {}
68 68
69 // HttpProxyConnectJobs will time out after this many seconds. Note this is on 69 // HttpProxyConnectJobs will time out after this many seconds. Note this is on
70 // top of the timeout for the transport socket. 70 // top of the timeout for the transport socket.
71 #if (defined(OS_ANDROID) || defined(OS_IOS)) && defined(SPDY_PROXY_AUTH_ORIGIN) 71 // Proxy connect timeout should be independent of platform and be based on
mmenke 2014/09/05 16:29:10 nit: This should be prefixed with "TODO(kundaji):
Not at Google. Contact bengr 2014/09/05 21:24:35 Done.
72 // proxy. Bug 407446.
73 #if (defined(OS_ANDROID) || defined(OS_IOS))
mmenke 2014/09/05 16:29:10 nit: outer parentheses not needed.
Not at Google. Contact bengr 2014/09/05 21:24:35 Done.
72 static const int kHttpProxyConnectJobTimeoutInSeconds = 10; 74 static const int kHttpProxyConnectJobTimeoutInSeconds = 10;
73 #else 75 #else
74 static const int kHttpProxyConnectJobTimeoutInSeconds = 30; 76 static const int kHttpProxyConnectJobTimeoutInSeconds = 30;
75 #endif 77 #endif
76 78
77
78 HttpProxyConnectJob::HttpProxyConnectJob( 79 HttpProxyConnectJob::HttpProxyConnectJob(
79 const std::string& group_name, 80 const std::string& group_name,
80 RequestPriority priority, 81 RequestPriority priority,
81 const scoped_refptr<HttpProxySocketParams>& params, 82 const scoped_refptr<HttpProxySocketParams>& params,
82 const base::TimeDelta& timeout_duration, 83 const base::TimeDelta& timeout_duration,
83 TransportClientSocketPool* transport_pool, 84 TransportClientSocketPool* transport_pool,
84 SSLClientSocketPool* ssl_pool, 85 SSLClientSocketPool* ssl_pool,
85 HostResolver* host_resolver, 86 HostResolver* host_resolver,
86 Delegate* delegate, 87 Delegate* delegate,
87 NetLog* net_log) 88 NetLog* net_log)
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 base_.RemoveHigherLayeredPool(higher_pool); 542 base_.RemoveHigherLayeredPool(higher_pool);
542 } 543 }
543 544
544 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { 545 bool HttpProxyClientSocketPool::CloseOneIdleConnection() {
545 if (base_.CloseOneIdleSocket()) 546 if (base_.CloseOneIdleSocket())
546 return true; 547 return true;
547 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 548 return base_.CloseOneIdleConnectionInHigherLayeredPool();
548 } 549 }
549 550
550 } // namespace net 551 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698