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