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 <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 namespace net { | 51 namespace net { |
52 | 52 |
53 DhcpProxyScriptFetcherWin::DhcpProxyScriptFetcherWin( | 53 DhcpProxyScriptFetcherWin::DhcpProxyScriptFetcherWin( |
54 URLRequestContext* url_request_context) | 54 URLRequestContext* url_request_context) |
55 : state_(STATE_START), | 55 : state_(STATE_START), |
56 num_pending_fetchers_(0), | 56 num_pending_fetchers_(0), |
57 destination_string_(NULL), | 57 destination_string_(NULL), |
58 url_request_context_(url_request_context) { | 58 url_request_context_(url_request_context) { |
59 DCHECK(url_request_context_); | 59 DCHECK(url_request_context_); |
60 | 60 |
61 worker_pool_ = new base::SequencedWorkerPool(kMaxDhcpLookupThreads, | 61 worker_pool_ = new base::SequencedWorkerPool( |
62 "PacDhcpLookup"); | 62 kMaxDhcpLookupThreads, "PacDhcpLookup", base::TaskPriority::USER_VISIBLE); |
63 } | 63 } |
64 | 64 |
65 DhcpProxyScriptFetcherWin::~DhcpProxyScriptFetcherWin() { | 65 DhcpProxyScriptFetcherWin::~DhcpProxyScriptFetcherWin() { |
66 // Count as user-initiated if we are not yet in STATE_DONE. | 66 // Count as user-initiated if we are not yet in STATE_DONE. |
67 Cancel(); | 67 Cancel(); |
68 | 68 |
69 worker_pool_->Shutdown(); | 69 worker_pool_->Shutdown(); |
70 } | 70 } |
71 | 71 |
72 int DhcpProxyScriptFetcherWin::Fetch(base::string16* utf16_text, | 72 int DhcpProxyScriptFetcherWin::Fetch(base::string16* utf16_text, |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 bool DhcpProxyScriptFetcherWin::AdapterQuery::ImplGetCandidateAdapterNames( | 375 bool DhcpProxyScriptFetcherWin::AdapterQuery::ImplGetCandidateAdapterNames( |
376 std::set<std::string>* adapter_names) { | 376 std::set<std::string>* adapter_names) { |
377 return DhcpProxyScriptFetcherWin::GetCandidateAdapterNames(adapter_names); | 377 return DhcpProxyScriptFetcherWin::GetCandidateAdapterNames(adapter_names); |
378 } | 378 } |
379 | 379 |
380 DhcpProxyScriptFetcherWin::AdapterQuery::~AdapterQuery() { | 380 DhcpProxyScriptFetcherWin::AdapterQuery::~AdapterQuery() { |
381 } | 381 } |
382 | 382 |
383 } // namespace net | 383 } // namespace net |
OLD | NEW |