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 <string> | 9 #include <string> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void ResetCurRequestState(); | 78 void ResetCurRequestState(); |
79 | 79 |
80 // Callback for time-out task of request with id |id|. | 80 // Callback for time-out task of request with id |id|. |
81 void OnTimeout(int id); | 81 void OnTimeout(int id); |
82 | 82 |
83 // Factory for creating the time-out task. This takes care of revoking | 83 // Factory for creating the time-out task. This takes care of revoking |
84 // outstanding tasks when |this| is deleted. | 84 // outstanding tasks when |this| is deleted. |
85 base::WeakPtrFactory<ProxyScriptFetcherImpl> weak_factory_; | 85 base::WeakPtrFactory<ProxyScriptFetcherImpl> weak_factory_; |
86 | 86 |
87 // The context used for making network requests. | 87 // The context used for making network requests. |
88 URLRequestContext* url_request_context_; | 88 URLRequestContext* const url_request_context_; |
89 | 89 |
90 // Buffer that URLRequest writes into. | 90 // Buffer that URLRequest writes into. |
91 scoped_refptr<IOBuffer> buf_; | 91 scoped_refptr<IOBuffer> buf_; |
92 | 92 |
93 // The next ID to use for |cur_request_| (monotonically increasing). | 93 // The next ID to use for |cur_request_| (monotonically increasing). |
94 int next_id_; | 94 int next_id_; |
95 | 95 |
96 // The current (in progress) request, or NULL. | 96 // The current (in progress) request, or NULL. |
97 scoped_ptr<URLRequest> cur_request_; | 97 scoped_ptr<URLRequest> cur_request_; |
98 | 98 |
(...skipping 20 matching lines...) Expand all Loading... |
119 | 119 |
120 // The maximum amount of time to wait for download to complete. | 120 // The maximum amount of time to wait for download to complete. |
121 base::TimeDelta max_duration_; | 121 base::TimeDelta max_duration_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); | 123 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace net | 126 } // namespace net |
127 | 127 |
128 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ | 128 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ |
OLD | NEW |