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_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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 virtual ~ProxyScriptFetcherImpl(); | 39 virtual ~ProxyScriptFetcherImpl(); |
40 | 40 |
41 // Used by unit-tests to modify the default limits. | 41 // Used by unit-tests to modify the default limits. |
42 base::TimeDelta SetTimeoutConstraint(base::TimeDelta timeout); | 42 base::TimeDelta SetTimeoutConstraint(base::TimeDelta timeout); |
43 size_t SetSizeConstraint(size_t size_bytes); | 43 size_t SetSizeConstraint(size_t size_bytes); |
44 | 44 |
45 void OnResponseCompleted(URLRequest* request); | 45 void OnResponseCompleted(URLRequest* request); |
46 | 46 |
47 // ProxyScriptFetcher methods: | 47 // ProxyScriptFetcher methods: |
48 virtual int Fetch(const GURL& url, base::string16* text, | 48 virtual int Fetch(const GURL& url, |
| 49 base::string16* text, |
49 const net::CompletionCallback& callback) OVERRIDE; | 50 const net::CompletionCallback& callback) OVERRIDE; |
50 virtual void Cancel() OVERRIDE; | 51 virtual void Cancel() OVERRIDE; |
51 virtual URLRequestContext* GetRequestContext() const OVERRIDE; | 52 virtual URLRequestContext* GetRequestContext() const OVERRIDE; |
52 | 53 |
53 // URLRequest::Delegate methods: | 54 // URLRequest::Delegate methods: |
54 virtual void OnAuthRequired(URLRequest* request, | 55 virtual void OnAuthRequired(URLRequest* request, |
55 AuthChallengeInfo* auth_info) OVERRIDE; | 56 AuthChallengeInfo* auth_info) OVERRIDE; |
56 virtual void OnSSLCertificateError(URLRequest* request, | 57 virtual void OnSSLCertificateError(URLRequest* request, |
57 const SSLInfo& ssl_info, | 58 const SSLInfo& ssl_info, |
58 bool is_hsts_ok) OVERRIDE; | 59 bool is_hsts_ok) OVERRIDE; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 119 |
119 // The maximum amount of time to wait for download to complete. | 120 // The maximum amount of time to wait for download to complete. |
120 base::TimeDelta max_duration_; | 121 base::TimeDelta max_duration_; |
121 | 122 |
122 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); | 123 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); |
123 }; | 124 }; |
124 | 125 |
125 } // namespace net | 126 } // namespace net |
126 | 127 |
127 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ | 128 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ |
OLD | NEW |