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

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

Issue 10029001: Update use of TimeDelta in net/*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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/base/network_config_watcher_mac.cc ('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) 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/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"
(...skipping 18 matching lines...) Expand all
29 if (!base::WorkerPool::PostTask(FROM_HERE, base::Bind( 29 if (!base::WorkerPool::PostTask(FROM_HERE, base::Bind(
30 &SerialWorker::DoWorkJob, this), false)) { 30 &SerialWorker::DoWorkJob, this), false)) {
31 #if defined(OS_POSIX) 31 #if defined(OS_POSIX)
32 // See worker_pool_posix.cc. 32 // See worker_pool_posix.cc.
33 NOTREACHED() << "WorkerPool::PostTask is not expected to fail on posix"; 33 NOTREACHED() << "WorkerPool::PostTask is not expected to fail on posix";
34 #else 34 #else
35 LOG(WARNING) << "Failed to WorkerPool::PostTask, will retry later"; 35 LOG(WARNING) << "Failed to WorkerPool::PostTask, will retry later";
36 message_loop_->PostDelayedTask( 36 message_loop_->PostDelayedTask(
37 FROM_HERE, 37 FROM_HERE,
38 base::Bind(&SerialWorker::RetryWork, this), 38 base::Bind(&SerialWorker::RetryWork, this),
39 kWorkerPoolRetryDelayMs); 39 base::TimeDelta::FromMilliseconds(kWorkerPoolRetryDelayMs));
40 state_ = WAITING; 40 state_ = WAITING;
41 return; 41 return;
42 #endif 42 #endif
43 } 43 }
44 state_ = WORKING; 44 state_ = WORKING;
45 return; 45 return;
46 case WORKING: 46 case WORKING:
47 // Remember to re-read after |DoRead| finishes. 47 // Remember to re-read after |DoRead| finishes.
48 state_ = PENDING; 48 state_ = PENDING;
49 return; 49 return;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 state_ = IDLE; 95 state_ = IDLE;
96 WorkNow(); 96 WorkNow();
97 return; 97 return;
98 default: 98 default:
99 NOTREACHED() << "Unexpected state " << state_; 99 NOTREACHED() << "Unexpected state " << state_;
100 } 100 }
101 } 101 }
102 102
103 } // namespace net 103 } // namespace net
104 104
OLDNEW
« no previous file with comments | « net/base/network_config_watcher_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698