OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // of Proxy authentication credentials, the delegate OnNeedsProxyAuth | 128 // of Proxy authentication credentials, the delegate OnNeedsProxyAuth |
129 // will have been called. It now becomes the delegate's responsibility | 129 // will have been called. It now becomes the delegate's responsibility |
130 // to collect the necessary credentials, and then call this method to | 130 // to collect the necessary credentials, and then call this method to |
131 // resume the HttpStream creation process. | 131 // resume the HttpStream creation process. |
132 virtual int RestartTunnelWithProxyAuth(const string16& username, | 132 virtual int RestartTunnelWithProxyAuth(const string16& username, |
133 const string16& password) = 0; | 133 const string16& password) = 0; |
134 | 134 |
135 // Returns the LoadState for the request. | 135 // Returns the LoadState for the request. |
136 virtual LoadState GetLoadState() const = 0; | 136 virtual LoadState GetLoadState() const = 0; |
137 | 137 |
138 // Returns true if an AlternateProtocol for this request was available. | |
139 virtual bool was_alternate_protocol_available() const = 0; | |
140 | |
141 // Returns true if TLS/NPN was negotiated for this stream. | 138 // Returns true if TLS/NPN was negotiated for this stream. |
142 virtual bool was_npn_negotiated() const = 0; | 139 virtual bool was_npn_negotiated() const = 0; |
143 | 140 |
144 // Returns true if this stream is being fetched over SPDY. | 141 // Returns true if this stream is being fetched over SPDY. |
145 virtual bool using_spdy() const = 0; | 142 virtual bool using_spdy() const = 0; |
146 }; | 143 }; |
147 | 144 |
148 // The HttpStreamFactory defines an interface for creating usable HttpStreams. | 145 // The HttpStreamFactory defines an interface for creating usable HttpStreams. |
149 class HttpStreamFactory { | 146 class HttpStreamFactory { |
150 public: | 147 public: |
(...skipping 13 matching lines...) Expand all Loading... |
164 const SSLConfig& ssl_config, | 161 const SSLConfig& ssl_config, |
165 HttpStreamRequest::Delegate* delegate, | 162 HttpStreamRequest::Delegate* delegate, |
166 const BoundNetLog& net_log) = 0; | 163 const BoundNetLog& net_log) = 0; |
167 | 164 |
168 // Requests that enough connections for |num_streams| be opened. | 165 // Requests that enough connections for |num_streams| be opened. |
169 virtual void PreconnectStreams(int num_streams, | 166 virtual void PreconnectStreams(int num_streams, |
170 const HttpRequestInfo& info, | 167 const HttpRequestInfo& info, |
171 const SSLConfig& ssl_config, | 168 const SSLConfig& ssl_config, |
172 const BoundNetLog& net_log) = 0; | 169 const BoundNetLog& net_log) = 0; |
173 | 170 |
174 virtual void AddTLSIntolerantServer(const GURL& url) = 0; | 171 virtual void AddTLSIntolerantServer(const HostPortPair& server) = 0; |
175 virtual bool IsTLSIntolerantServer(const GURL& url) const = 0; | 172 virtual bool IsTLSIntolerantServer(const HostPortPair& server) const = 0; |
176 | 173 |
177 // Static settings | 174 // Static settings |
178 static GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); | 175 static GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); |
179 | 176 |
180 // Turns spdy on or off. | 177 // Turns spdy on or off. |
181 static void set_spdy_enabled(bool value) { | 178 static void set_spdy_enabled(bool value) { |
182 spdy_enabled_ = value; | 179 spdy_enabled_ = value; |
183 if (value == false) | 180 if (value == false) |
184 set_next_protos(""); | 181 set_next_protos(""); |
185 } | 182 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 static bool force_spdy_always_; | 240 static bool force_spdy_always_; |
244 static std::list<HostPortPair>* forced_spdy_exclusions_; | 241 static std::list<HostPortPair>* forced_spdy_exclusions_; |
245 static bool ignore_certificate_errors_; | 242 static bool ignore_certificate_errors_; |
246 | 243 |
247 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 244 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
248 }; | 245 }; |
249 | 246 |
250 } // namespace net | 247 } // namespace net |
251 | 248 |
252 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 249 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |