| 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 #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/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 int Preconnect(int num_streams, | 51 int Preconnect(int num_streams, |
| 52 const HttpRequestInfo& request_info, | 52 const HttpRequestInfo& request_info, |
| 53 const SSLConfig& ssl_config, | 53 const SSLConfig& ssl_config, |
| 54 const BoundNetLog& net_log); | 54 const BoundNetLog& net_log); |
| 55 | 55 |
| 56 int RestartTunnelWithProxyAuth(const string16& username, | 56 int RestartTunnelWithProxyAuth(const string16& username, |
| 57 const string16& password); | 57 const string16& password); |
| 58 LoadState GetLoadState() const; | 58 LoadState GetLoadState() const; |
| 59 | 59 |
| 60 void Orphan(const Request* request); |
| 61 |
| 60 bool was_alternate_protocol_available() const; | 62 bool was_alternate_protocol_available() const; |
| 61 bool was_npn_negotiated() const; | 63 bool was_npn_negotiated() const; |
| 62 bool using_spdy() const; | 64 bool using_spdy() const; |
| 63 const BoundNetLog& net_log() const { return net_log_; } | 65 const BoundNetLog& net_log() const { return net_log_; } |
| 64 | 66 |
| 65 const SSLConfig& ssl_config() const; | 67 const SSLConfig& ssl_config() const; |
| 66 const ProxyInfo& proxy_info() const; | 68 const ProxyInfo& proxy_info() const; |
| 67 | 69 |
| 68 // Indicates whether or not this job is performing a preconnect. | 70 // Indicates whether or not this job is performing a preconnect. |
| 69 bool IsPreconnecting() const; | 71 bool IsPreconnecting() const; |
| 70 | 72 |
| 73 // Indicates whether or not this Job has been orphaned by a Request. |
| 74 bool IsOrphaned() const; |
| 75 |
| 71 private: | 76 private: |
| 72 enum AlternateProtocolMode { | 77 enum AlternateProtocolMode { |
| 73 kUnspecified, // Unspecified, check HttpAlternateProtocols | 78 kUnspecified, // Unspecified, check HttpAlternateProtocols |
| 74 kUsingAlternateProtocol, // Using an alternate protocol | 79 kUsingAlternateProtocol, // Using an alternate protocol |
| 75 kDoNotUseAlternateProtocol, // Failed to connect once, do not try again. | 80 kDoNotUseAlternateProtocol, // Failed to connect once, do not try again. |
| 76 }; | 81 }; |
| 77 | 82 |
| 78 enum State { | 83 enum State { |
| 79 STATE_RESOLVE_PROXY, | 84 STATE_RESOLVE_PROXY, |
| 80 STATE_RESOLVE_PROXY_COMPLETE, | 85 STATE_RESOLVE_PROXY_COMPLETE, |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 bool spdy_session_direct_; | 247 bool spdy_session_direct_; |
| 243 | 248 |
| 244 ScopedRunnableMethodFactory<Job> method_factory_; | 249 ScopedRunnableMethodFactory<Job> method_factory_; |
| 245 | 250 |
| 246 DISALLOW_COPY_AND_ASSIGN(Job); | 251 DISALLOW_COPY_AND_ASSIGN(Job); |
| 247 }; | 252 }; |
| 248 | 253 |
| 249 } // namespace net | 254 } // namespace net |
| 250 | 255 |
| 251 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 256 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
| OLD | NEW |