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_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ | 5 #ifndef NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ |
6 #define NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ | 6 #define NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // ProxyScriptFetcher methods: | 47 // ProxyScriptFetcher methods: |
48 virtual int Fetch(const GURL& url, string16* text, | 48 virtual int Fetch(const GURL& url, string16* text, |
49 CompletionCallback* callback) OVERRIDE; | 49 CompletionCallback* callback) OVERRIDE; |
50 virtual void Cancel() OVERRIDE; | 50 virtual void Cancel() OVERRIDE; |
51 virtual URLRequestContext* GetRequestContext() const OVERRIDE; | 51 virtual URLRequestContext* GetRequestContext() const OVERRIDE; |
52 | 52 |
53 // URLRequest::Delegate methods: | 53 // URLRequest::Delegate methods: |
54 virtual void OnAuthRequired(URLRequest* request, | 54 virtual void OnAuthRequired(URLRequest* request, |
55 AuthChallengeInfo* auth_info) OVERRIDE; | 55 AuthChallengeInfo* auth_info) OVERRIDE; |
56 virtual void OnSSLCertificateError(URLRequest* request, int cert_error, | 56 virtual void OnSSLCertificateError(URLRequest* request, |
57 X509Certificate* cert) OVERRIDE; | 57 const SSLInfo& ssl_info, |
| 58 bool is_hsts_ok) OVERRIDE; |
58 virtual void OnResponseStarted(URLRequest* request) OVERRIDE; | 59 virtual void OnResponseStarted(URLRequest* request) OVERRIDE; |
59 virtual void OnReadCompleted(URLRequest* request, int num_bytes) OVERRIDE; | 60 virtual void OnReadCompleted(URLRequest* request, int num_bytes) OVERRIDE; |
60 | 61 |
61 private: | 62 private: |
62 enum { kBufSize = 4096 }; | 63 enum { kBufSize = 4096 }; |
63 | 64 |
64 // Read more bytes from the response. | 65 // Read more bytes from the response. |
65 void ReadBody(URLRequest* request); | 66 void ReadBody(URLRequest* request); |
66 | 67 |
67 // Handles a response from Read(). Returns true if we should continue trying | 68 // Handles a response from Read(). Returns true if we should continue trying |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 118 |
118 // The maximum amount of time to wait for download to complete. | 119 // The maximum amount of time to wait for download to complete. |
119 base::TimeDelta max_duration_; | 120 base::TimeDelta max_duration_; |
120 | 121 |
121 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); | 122 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); |
122 }; | 123 }; |
123 | 124 |
124 } // namespace net | 125 } // namespace net |
125 | 126 |
126 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ | 127 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ |
OLD | NEW |