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

Side by Side Diff: net/dns/serial_worker.cc

Issue 9721002: [net/dns] Removes locking from DnsConfigServiceWin and adds local computer name. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move lowercasing to ServeFromHosts, add test. Reorganize OnHostsRead. Created 8 years, 9 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
« no previous file with comments | « net/dns/serial_worker.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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/dns/serial_worker.h" 5 #include "net/dns/serial_worker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/threading/worker_pool.h" 10 #include "base/threading/worker_pool.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 namespace {
15 // Delay between calls to WorkerPool::PostTask
16 const int kWorkerPoolRetryDelayMs = 100;
17 }
18
14 SerialWorker::SerialWorker() 19 SerialWorker::SerialWorker()
15 : message_loop_(base::MessageLoopProxy::current()), 20 : message_loop_(base::MessageLoopProxy::current()),
16 state_(IDLE) {} 21 state_(IDLE) {}
17 22
18 SerialWorker::~SerialWorker() {} 23 SerialWorker::~SerialWorker() {}
19 24
20 void SerialWorker::WorkNow() { 25 void SerialWorker::WorkNow() {
21 DCHECK(message_loop_->BelongsToCurrentThread()); 26 DCHECK(message_loop_->BelongsToCurrentThread());
22 switch (state_) { 27 switch (state_) {
23 case IDLE: 28 case IDLE:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 state_ = IDLE; 95 state_ = IDLE;
91 WorkNow(); 96 WorkNow();
92 return; 97 return;
93 default: 98 default:
94 NOTREACHED() << "Unexpected state " << state_; 99 NOTREACHED() << "Unexpected state " << state_;
95 } 100 }
96 } 101 }
97 102
98 } // namespace net 103 } // namespace net
99 104
OLDNEW
« no previous file with comments | « net/dns/serial_worker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698