| 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/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // not grow the thread pool to its maximum size (rather, they will | 36 // not grow the thread pool to its maximum size (rather, they will |
| 37 // grow it to 6 or fewer threads) so setting the limit lower would not | 37 // grow it to 6 or fewer threads) so setting the limit lower would not |
| 38 // improve performance or memory usage on those systems. | 38 // improve performance or memory usage on those systems. |
| 39 const int kMaxDhcpLookupThreads = 12; | 39 const int kMaxDhcpLookupThreads = 12; |
| 40 | 40 |
| 41 // How long to wait at maximum after we get results (a PAC file or | 41 // How long to wait at maximum after we get results (a PAC file or |
| 42 // knowledge that no PAC file is configured) from whichever network | 42 // knowledge that no PAC file is configured) from whichever network |
| 43 // adapter finishes first. | 43 // adapter finishes first. |
| 44 const int kMaxWaitAfterFirstResultMs = 400; | 44 const int kMaxWaitAfterFirstResultMs = 400; |
| 45 | 45 |
| 46 const int kGetAdaptersAddressesErrors[] = { | |
| 47 ERROR_ADDRESS_NOT_ASSOCIATED, | |
| 48 ERROR_BUFFER_OVERFLOW, | |
| 49 ERROR_INVALID_PARAMETER, | |
| 50 ERROR_NOT_ENOUGH_MEMORY, | |
| 51 ERROR_NO_DATA, | |
| 52 }; | |
| 53 | |
| 54 } // namespace | 46 } // namespace |
| 55 | 47 |
| 56 namespace net { | 48 namespace net { |
| 57 | 49 |
| 58 DhcpProxyScriptFetcherWin::DhcpProxyScriptFetcherWin( | 50 DhcpProxyScriptFetcherWin::DhcpProxyScriptFetcherWin( |
| 59 URLRequestContext* url_request_context) | 51 URLRequestContext* url_request_context) |
| 60 : state_(STATE_START), | 52 : state_(STATE_START), |
| 61 num_pending_fetchers_(0), | 53 num_pending_fetchers_(0), |
| 62 destination_string_(NULL), | 54 destination_string_(NULL), |
| 63 url_request_context_(url_request_context) { | 55 url_request_context_(url_request_context) { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 370 |
| 379 bool DhcpProxyScriptFetcherWin::AdapterQuery::ImplGetCandidateAdapterNames( | 371 bool DhcpProxyScriptFetcherWin::AdapterQuery::ImplGetCandidateAdapterNames( |
| 380 std::set<std::string>* adapter_names) { | 372 std::set<std::string>* adapter_names) { |
| 381 return DhcpProxyScriptFetcherWin::GetCandidateAdapterNames(adapter_names); | 373 return DhcpProxyScriptFetcherWin::GetCandidateAdapterNames(adapter_names); |
| 382 } | 374 } |
| 383 | 375 |
| 384 DhcpProxyScriptFetcherWin::AdapterQuery::~AdapterQuery() { | 376 DhcpProxyScriptFetcherWin::AdapterQuery::~AdapterQuery() { |
| 385 } | 377 } |
| 386 | 378 |
| 387 } // namespace net | 379 } // namespace net |
| OLD | NEW |