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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // Retrieve SSLInfo from our SSL Socket. | 203 // Retrieve SSLInfo from our SSL Socket. |
204 // This must only be called when we are using an SSLSocket. | 204 // This must only be called when we are using an SSLSocket. |
205 // After calling, the caller can use ssl_info_. | 205 // After calling, the caller can use ssl_info_. |
206 void GetSSLInfo(); | 206 void GetSSLInfo(); |
207 | 207 |
208 SpdySessionKey GetSpdySessionKey() const; | 208 SpdySessionKey GetSpdySessionKey() const; |
209 | 209 |
210 // Returns true if the current request can use an existing spdy session. | 210 // Returns true if the current request can use an existing spdy session. |
211 bool CanUseExistingSpdySession() const; | 211 bool CanUseExistingSpdySession() const; |
212 | 212 |
| 213 // Returns true if |spdy_session| has an associated SSL certificate with is |
| 214 // valid for |origin_url_|. |
| 215 bool IsAlternativeCertificateValidForOrigin( |
| 216 base::WeakPtr<SpdySession> spdy_session); |
| 217 |
213 // Called when we encounter a network error that could be resolved by trying | 218 // Called when we encounter a network error that could be resolved by trying |
214 // a new proxy configuration. If there is another proxy configuration to try | 219 // a new proxy configuration. If there is another proxy configuration to try |
215 // then this method sets next_state_ appropriately and returns either OK or | 220 // then this method sets next_state_ appropriately and returns either OK or |
216 // ERR_IO_PENDING depending on whether or not the new proxy configuration is | 221 // ERR_IO_PENDING depending on whether or not the new proxy configuration is |
217 // available synchronously or asynchronously. Otherwise, the given error | 222 // available synchronously or asynchronously. Otherwise, the given error |
218 // code is simply returned. | 223 // code is simply returned. |
219 int ReconsiderProxyAfterError(int error); | 224 int ReconsiderProxyAfterError(int error); |
220 | 225 |
221 // Called to handle a certificate error. Stores the certificate in the | 226 // Called to handle a certificate error. Stores the certificate in the |
222 // allowed_bad_certs list, and checks if the error can be ignored. Returns | 227 // allowed_bad_certs list, and checks if the error can be ignored. Returns |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 JobStatus other_job_status_; | 345 JobStatus other_job_status_; |
341 | 346 |
342 base::WeakPtrFactory<Job> ptr_factory_; | 347 base::WeakPtrFactory<Job> ptr_factory_; |
343 | 348 |
344 DISALLOW_COPY_AND_ASSIGN(Job); | 349 DISALLOW_COPY_AND_ASSIGN(Job); |
345 }; | 350 }; |
346 | 351 |
347 } // namespace net | 352 } // namespace net |
348 | 353 |
349 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 354 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
OLD | NEW |