| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_service.h" | 5 #include "net/proxy/proxy_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 results_->RemoveBadProxies(service_->proxy_retry_info_); | 163 results_->RemoveBadProxies(service_->proxy_retry_info_); |
| 164 | 164 |
| 165 LoadLog::EndEvent(load_log_, LoadLog::TYPE_PROXY_SERVICE); | 165 LoadLog::EndEvent(load_log_, LoadLog::TYPE_PROXY_SERVICE); |
| 166 | 166 |
| 167 return result_code; | 167 return result_code; |
| 168 } | 168 } |
| 169 | 169 |
| 170 LoadLog* load_log() const { return load_log_; } | 170 LoadLog* load_log() const { return load_log_; } |
| 171 | 171 |
| 172 private: | 172 private: |
| 173 friend class base::RefCounted<ProxyService::PacRequest>; |
| 174 |
| 175 ~PacRequest() {} |
| 176 |
| 173 // Callback for when the ProxyResolver request has completed. | 177 // Callback for when the ProxyResolver request has completed. |
| 174 void QueryComplete(int result_code) { | 178 void QueryComplete(int result_code) { |
| 175 result_code = QueryDidComplete(result_code); | 179 result_code = QueryDidComplete(result_code); |
| 176 | 180 |
| 177 // Remove this completed PacRequest from the service's pending list. | 181 // Remove this completed PacRequest from the service's pending list. |
| 178 /// (which will probably cause deletion of |this|). | 182 /// (which will probably cause deletion of |this|). |
| 179 CompletionCallback* callback = user_callback_; | 183 CompletionCallback* callback = user_callback_; |
| 180 service_->RemovePendingRequest(this); | 184 service_->RemovePendingRequest(this); |
| 181 | 185 |
| 182 callback->Run(result_code); | 186 callback->Run(result_code); |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 OnCompletion(result_); | 793 OnCompletion(result_); |
| 790 } | 794 } |
| 791 } | 795 } |
| 792 | 796 |
| 793 void SyncProxyServiceHelper::OnCompletion(int rv) { | 797 void SyncProxyServiceHelper::OnCompletion(int rv) { |
| 794 result_ = rv; | 798 result_ = rv; |
| 795 event_.Signal(); | 799 event_.Signal(); |
| 796 } | 800 } |
| 797 | 801 |
| 798 } // namespace net | 802 } // namespace net |
| OLD | NEW |