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 #include "net/proxy/proxy_script_fetcher_impl.h" | 5 #include "net/proxy/proxy_script_fetcher_impl.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/i18n/icu_string_conversions.h" | 8 #include "base/i18n/icu_string_conversions.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 cur_request_->Start(); | 164 cur_request_->Start(); |
165 return ERR_IO_PENDING; | 165 return ERR_IO_PENDING; |
166 } | 166 } |
167 | 167 |
168 void ProxyScriptFetcherImpl::Cancel() { | 168 void ProxyScriptFetcherImpl::Cancel() { |
169 // ResetCurRequestState will free the URLRequest, which will cause | 169 // ResetCurRequestState will free the URLRequest, which will cause |
170 // cancellation. | 170 // cancellation. |
171 ResetCurRequestState(); | 171 ResetCurRequestState(); |
172 } | 172 } |
173 | 173 |
174 URLRequestContext* ProxyScriptFetcherImpl::GetRequestContext() { | 174 URLRequestContext* ProxyScriptFetcherImpl::GetRequestContext() const { |
175 return url_request_context_; | 175 return url_request_context_; |
176 } | 176 } |
177 | 177 |
178 void ProxyScriptFetcherImpl::OnAuthRequired(URLRequest* request, | 178 void ProxyScriptFetcherImpl::OnAuthRequired(URLRequest* request, |
179 AuthChallengeInfo* auth_info) { | 179 AuthChallengeInfo* auth_info) { |
180 DCHECK_EQ(request, cur_request_.get()); | 180 DCHECK_EQ(request, cur_request_.get()); |
181 // TODO(eroman): http://crbug.com/77366 | 181 // TODO(eroman): http://crbug.com/77366 |
182 LOG(WARNING) << "Auth required to fetch PAC script, aborting."; | 182 LOG(WARNING) << "Auth required to fetch PAC script, aborting."; |
183 result_code_ = ERR_NOT_IMPLEMENTED; | 183 result_code_ = ERR_NOT_IMPLEMENTED; |
184 request->CancelAuth(); | 184 request->CancelAuth(); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // is still applicable. | 307 // is still applicable. |
308 if (cur_request_id_ != id) | 308 if (cur_request_id_ != id) |
309 return; | 309 return; |
310 | 310 |
311 DCHECK(cur_request_.get()); | 311 DCHECK(cur_request_.get()); |
312 result_code_ = ERR_TIMED_OUT; | 312 result_code_ = ERR_TIMED_OUT; |
313 cur_request_->Cancel(); | 313 cur_request_->Cancel(); |
314 } | 314 } |
315 | 315 |
316 } // namespace net | 316 } // namespace net |
OLD | NEW |