| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/dhcp_proxy_script_fetcher_win.h" | 5 #include "net/proxy/dhcp_proxy_script_fetcher_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/perftimer.h" | 10 #include "base/perftimer.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 callback_.Reset(); | 103 callback_.Reset(); |
| 104 wait_timer_.Stop(); | 104 wait_timer_.Stop(); |
| 105 state_ = STATE_DONE; | 105 state_ = STATE_DONE; |
| 106 | 106 |
| 107 for (FetcherVector::iterator it = fetchers_.begin(); | 107 for (FetcherVector::iterator it = fetchers_.begin(); |
| 108 it != fetchers_.end(); | 108 it != fetchers_.end(); |
| 109 ++it) { | 109 ++it) { |
| 110 (*it)->Cancel(); | 110 (*it)->Cancel(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 fetchers_.reset(); | 113 fetchers_.clear(); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 | 116 |
| 117 void DhcpProxyScriptFetcherWin::OnGetCandidateAdapterNamesDone( | 117 void DhcpProxyScriptFetcherWin::OnGetCandidateAdapterNamesDone( |
| 118 scoped_refptr<AdapterQuery> query) { | 118 scoped_refptr<AdapterQuery> query) { |
| 119 DCHECK(CalledOnValidThread()); | 119 DCHECK(CalledOnValidThread()); |
| 120 | 120 |
| 121 // This can happen if this object is reused for multiple queries, | 121 // This can happen if this object is reused for multiple queries, |
| 122 // and a previous query was cancelled before it completed. | 122 // and a previous query was cancelled before it completed. |
| 123 if (query.get() != last_query_.get()) | 123 if (query.get() != last_query_.get()) |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 DhcpProxyScriptFetcherWin::AdapterQuery::adapter_names() const { | 366 DhcpProxyScriptFetcherWin::AdapterQuery::adapter_names() const { |
| 367 return adapter_names_; | 367 return adapter_names_; |
| 368 } | 368 } |
| 369 | 369 |
| 370 bool DhcpProxyScriptFetcherWin::AdapterQuery::ImplGetCandidateAdapterNames( | 370 bool DhcpProxyScriptFetcherWin::AdapterQuery::ImplGetCandidateAdapterNames( |
| 371 std::set<std::string>* adapter_names) { | 371 std::set<std::string>* adapter_names) { |
| 372 return DhcpProxyScriptFetcherWin::GetCandidateAdapterNames(adapter_names); | 372 return DhcpProxyScriptFetcherWin::GetCandidateAdapterNames(adapter_names); |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace net | 375 } // namespace net |
| OLD | NEW |