summaryrefslogtreecommitdiffstats
path: root/net/dns/mdns_client_impl.cc
diff options
context:
space:
mode:
authorprashhir <prashhir@cisco.com>2014-09-17 10:27:27 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-17 17:27:37 +0000
commitd22b4a8eb8ef778afbc80a03d4b45f2e3b87e2df (patch)
tree4c2601b9cc55b1139c5405bbe9b29b55a8dcce31 /net/dns/mdns_client_impl.cc
parent89a0016c70cb029bc79fb70959f03fd2f0885b9d (diff)
downloadchromium_src-d22b4a8eb8ef778afbc80a03d4b45f2e3b87e2df.zip
chromium_src-d22b4a8eb8ef778afbc80a03d4b45f2e3b87e2df.tar.gz
chromium_src-d22b4a8eb8ef778afbc80a03d4b45f2e3b87e2df.tar.bz2
use base::Time constants in net module instead of using static constants
use base::Time constants in net module instead of using static constants in file BUG=412254 Review URL: https://codereview.chromium.org/578703003 Cr-Commit-Position: refs/heads/master@{#295292}
Diffstat (limited to 'net/dns/mdns_client_impl.cc')
-rw-r--r--net/dns/mdns_client_impl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dns/mdns_client_impl.cc b/net/dns/mdns_client_impl.cc
index 68cee7a..1745385 100644
--- a/net/dns/mdns_client_impl.cc
+++ b/net/dns/mdns_client_impl.cc
@@ -8,6 +8,7 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/stl_util.h"
#include "base/time/default_clock.h"
+#include "base/time/time.h"
#include "net/base/dns_util.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
@@ -32,7 +33,6 @@ const unsigned MDnsTransactionTimeoutSeconds = 3;
// the original TTL.
const double kListenerRefreshRatio1 = 0.85;
const double kListenerRefreshRatio2 = 0.95;
-const unsigned kMillisecondsPerSecond = 1000;
} // namespace
@@ -538,11 +538,11 @@ void MDnsListenerImpl::ScheduleNextRefresh() {
// be canceled and rescheduled if the record's TTL is updated due to a
// response being received.
base::Time next_refresh1 = last_update_ + base::TimeDelta::FromMilliseconds(
- static_cast<int>(kMillisecondsPerSecond *
+ static_cast<int>(base::Time::kMillisecondsPerSecond *
kListenerRefreshRatio1 * ttl_));
base::Time next_refresh2 = last_update_ + base::TimeDelta::FromMilliseconds(
- static_cast<int>(kMillisecondsPerSecond *
+ static_cast<int>(base::Time::kMillisecondsPerSecond *
kListenerRefreshRatio2 * ttl_));
base::MessageLoop::current()->PostDelayedTask(