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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // Should we force SPDY to run without SSL for this stream request. | 231 // Should we force SPDY to run without SSL for this stream request. |
232 bool ShouldForceSpdyWithoutSSL() const; | 232 bool ShouldForceSpdyWithoutSSL() const; |
233 | 233 |
234 // Should we force QUIC for this stream request. | 234 // Should we force QUIC for this stream request. |
235 bool ShouldForceQuic() const; | 235 bool ShouldForceQuic() const; |
236 | 236 |
237 void MaybeMarkAlternativeServiceBroken(); | 237 void MaybeMarkAlternativeServiceBroken(); |
238 | 238 |
239 ClientSocketPoolManager::SocketGroupType GetSocketGroup() const; | 239 ClientSocketPoolManager::SocketGroupType GetSocketGroup() const; |
240 | 240 |
| 241 void MaybeAddConnectionAttempts(); |
| 242 |
241 // Record histograms of latency until Connect() completes. | 243 // Record histograms of latency until Connect() completes. |
242 static void LogHttpConnectedMetrics(const ClientSocketHandle& handle); | 244 static void LogHttpConnectedMetrics(const ClientSocketHandle& handle); |
243 | 245 |
244 // Invoked by the transport socket pool after host resolution is complete | 246 // Invoked by the transport socket pool after host resolution is complete |
245 // to allow the connection to be aborted, if a matching SPDY session can | 247 // to allow the connection to be aborted, if a matching SPDY session can |
246 // be found. Will return ERR_SPDY_SESSION_ALREADY_EXISTS if such a | 248 // be found. Will return ERR_SPDY_SESSION_ALREADY_EXISTS if such a |
247 // session is found, and OK otherwise. | 249 // session is found, and OK otherwise. |
248 static int OnHostResolution(SpdySessionPool* spdy_session_pool, | 250 static int OnHostResolution(SpdySessionPool* spdy_session_pool, |
249 const SpdySessionKey& spdy_session_key, | 251 const SpdySessionKey& spdy_session_key, |
250 const AddressList& addresses, | 252 const AddressList& addresses, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 JobStatus other_job_status_; | 350 JobStatus other_job_status_; |
349 | 351 |
350 base::WeakPtrFactory<Job> ptr_factory_; | 352 base::WeakPtrFactory<Job> ptr_factory_; |
351 | 353 |
352 DISALLOW_COPY_AND_ASSIGN(Job); | 354 DISALLOW_COPY_AND_ASSIGN(Job); |
353 }; | 355 }; |
354 | 356 |
355 } // namespace net | 357 } // namespace net |
356 | 358 |
357 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 359 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
OLD | NEW |