| OLD | NEW |
| 1 // Copyright (c) 2010 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/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "base/task.h" | 13 #include "base/task.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "net/proxy/proxy_script_fetcher.h" | 15 #include "net/proxy/proxy_script_fetcher.h" |
| 16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 class URLRequestContext; | |
| 20 class X509Certificate; | 19 class X509Certificate; |
| 21 | 20 |
| 22 namespace net { | 21 namespace net { |
| 23 | 22 |
| 23 class URLRequestContext; |
| 24 |
| 24 // Implementation of ProxyScriptFetcher that downloads scripts using the | 25 // Implementation of ProxyScriptFetcher that downloads scripts using the |
| 25 // specified request context. | 26 // specified request context. |
| 26 class ProxyScriptFetcherImpl : public ProxyScriptFetcher, | 27 class ProxyScriptFetcherImpl : public ProxyScriptFetcher, |
| 27 public net::URLRequest::Delegate { | 28 public net::URLRequest::Delegate { |
| 28 public: | 29 public: |
| 29 // Creates a ProxyScriptFetcher that issues requests through | 30 // Creates a ProxyScriptFetcher that issues requests through |
| 30 // |url_request_context|. |url_request_context| must remain valid for the | 31 // |url_request_context|. |url_request_context| must remain valid for the |
| 31 // lifetime of ProxyScriptFetcherImpl. | 32 // lifetime of ProxyScriptFetcherImpl. |
| 32 // Note that while a request is in progress, we will be holding a reference | 33 // Note that while a request is in progress, we will be holding a reference |
| 33 // to |url_request_context|. Be careful not to create cycles between the | 34 // to |url_request_context|. Be careful not to create cycles between the |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 115 |
| 115 // The maximum amount of time to wait for download to complete. | 116 // The maximum amount of time to wait for download to complete. |
| 116 base::TimeDelta max_duration_; | 117 base::TimeDelta max_duration_; |
| 117 | 118 |
| 118 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); | 119 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 } // namespace net | 122 } // namespace net |
| 122 | 123 |
| 123 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ | 124 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ |
| OLD | NEW |