Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: net/proxy/dhcp_proxy_script_fetcher_win.cc

Issue 2077413009: Add TaskPriority as a parameter to SequencedWorkerPool in preparation for TaskScheduler experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2_hook
Patch Set: tweak comment Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc ('k') | services/shell/runner/host/child_process_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698