OLD | NEW |
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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 bool ShouldForceSpdySSL() const; | 228 bool ShouldForceSpdySSL() const; |
229 | 229 |
230 // Should we force SPDY to run without SSL for this stream request. | 230 // Should we force SPDY to run without SSL for this stream request. |
231 bool ShouldForceSpdyWithoutSSL() const; | 231 bool ShouldForceSpdyWithoutSSL() const; |
232 | 232 |
233 // Should we force QUIC for this stream request. | 233 // Should we force QUIC for this stream request. |
234 bool ShouldForceQuic() const; | 234 bool ShouldForceQuic() const; |
235 | 235 |
236 void MaybeMarkAlternateProtocolBroken(); | 236 void MaybeMarkAlternateProtocolBroken(); |
237 | 237 |
| 238 void MaybeAddConnectionAttempts(); |
| 239 |
238 // Record histograms of latency until Connect() completes. | 240 // Record histograms of latency until Connect() completes. |
239 static void LogHttpConnectedMetrics(const ClientSocketHandle& handle); | 241 static void LogHttpConnectedMetrics(const ClientSocketHandle& handle); |
240 | 242 |
241 // Invoked by the transport socket pool after host resolution is complete | 243 // Invoked by the transport socket pool after host resolution is complete |
242 // to allow the connection to be aborted, if a matching SPDY session can | 244 // to allow the connection to be aborted, if a matching SPDY session can |
243 // be found. Will return ERR_SPDY_SESSION_ALREADY_EXISTS if such a | 245 // be found. Will return ERR_SPDY_SESSION_ALREADY_EXISTS if such a |
244 // session is found, and OK otherwise. | 246 // session is found, and OK otherwise. |
245 static int OnHostResolution(SpdySessionPool* spdy_session_pool, | 247 static int OnHostResolution(SpdySessionPool* spdy_session_pool, |
246 const SpdySessionKey& spdy_session_key, | 248 const SpdySessionKey& spdy_session_key, |
247 const AddressList& addresses, | 249 const AddressList& addresses, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 JobStatus other_job_status_; | 344 JobStatus other_job_status_; |
343 | 345 |
344 base::WeakPtrFactory<Job> ptr_factory_; | 346 base::WeakPtrFactory<Job> ptr_factory_; |
345 | 347 |
346 DISALLOW_COPY_AND_ASSIGN(Job); | 348 DISALLOW_COPY_AND_ASSIGN(Job); |
347 }; | 349 }; |
348 | 350 |
349 } // namespace net | 351 } // namespace net |
350 | 352 |
351 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 353 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
OLD | NEW |