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

Side by Side Diff: net/base/host_resolver_impl.cc

Issue 9597005: Revert 124890 - Convert uses of int ms to TimeDelta in chrome/browser and net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « net/base/cookie_store_unittest.h ('k') | net/curvecp/client_packetizer.h » ('j') | 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/base/host_resolver_impl.h" 5 #include "net/base/host_resolver_impl.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Winsock2.h> 8 #include <Winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 make_scoped_refptr(new NetLogIntegerParameter( 629 make_scoped_refptr(new NetLogIntegerParameter(
630 "attempt_number", attempt_number_))); 630 "attempt_number", attempt_number_)));
631 631
632 // If we don't get the results within a given time, RetryIfNotComplete 632 // If we don't get the results within a given time, RetryIfNotComplete
633 // will start a new attempt on a different worker thread if none of our 633 // will start a new attempt on a different worker thread if none of our
634 // outstanding attempts have completed yet. 634 // outstanding attempts have completed yet.
635 if (attempt_number_ <= params_.max_retry_attempts) { 635 if (attempt_number_ <= params_.max_retry_attempts) {
636 origin_loop_->PostDelayedTask( 636 origin_loop_->PostDelayedTask(
637 FROM_HERE, 637 FROM_HERE,
638 base::Bind(&ProcTask::RetryIfNotComplete, this), 638 base::Bind(&ProcTask::RetryIfNotComplete, this),
639 params_.unresponsive_delay); 639 params_.unresponsive_delay.InMilliseconds());
640 } 640 }
641 } 641 }
642 642
643 // WARNING: This code runs inside a worker pool. The shutdown code cannot 643 // WARNING: This code runs inside a worker pool. The shutdown code cannot
644 // wait for it to finish, so we must be very careful here about using other 644 // wait for it to finish, so we must be very careful here about using other
645 // objects (like MessageLoops, Singletons, etc). During shutdown these objects 645 // objects (like MessageLoops, Singletons, etc). During shutdown these objects
646 // may no longer exist. Multiple DoLookups() could be running in parallel, so 646 // may no longer exist. Multiple DoLookups() could be running in parallel, so
647 // any state inside of |this| must not mutate . 647 // any state inside of |this| must not mutate .
648 void DoLookup(const base::TimeTicks& start_time, 648 void DoLookup(const base::TimeTicks& start_time,
649 const uint32 attempt_number) { 649 const uint32 attempt_number) {
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 } else { 1789 } else {
1790 dns_transaction_factory_.reset(); 1790 dns_transaction_factory_.reset();
1791 } 1791 }
1792 // Don't Abort running Jobs unless they were running on DnsTransaction. 1792 // Don't Abort running Jobs unless they were running on DnsTransaction.
1793 // TODO(szym): This will change once http://crbug.com/114827 is fixed. 1793 // TODO(szym): This will change once http://crbug.com/114827 is fixed.
1794 if (had_factory) 1794 if (had_factory)
1795 OnDNSChanged(NetworkChangeNotifier::CHANGE_DNS_SETTINGS); 1795 OnDNSChanged(NetworkChangeNotifier::CHANGE_DNS_SETTINGS);
1796 } 1796 }
1797 1797
1798 } // namespace net 1798 } // namespace net
OLDNEW
« no previous file with comments | « net/base/cookie_store_unittest.h ('k') | net/curvecp/client_packetizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698