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

Unified Diff: net/dns/dns_session.cc

Issue 1485853003: Revert of Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_session.h ('k') | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_session.cc
diff --git a/net/dns/dns_session.cc b/net/dns/dns_session.cc
index 3a6c4d4610f13147e0e051c50edc08b000857c1f..9ea2db9a20a2bfe4edea72b1d59ff2dba705b4e4 100644
--- a/net/dns/dns_session.cc
+++ b/net/dns/dns_session.cc
@@ -4,10 +4,7 @@
#include "net/dns/dns_session.h"
-#include <stdint.h>
-
-#include <limits>
-
+#include "base/basictypes.h"
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/metrics/histogram_macros.h"
@@ -89,9 +86,7 @@
NetLog* net_log)
: config_(config),
socket_pool_(socket_pool.Pass()),
- rand_callback_(base::Bind(rand_int_callback,
- 0,
- std::numeric_limits<uint16_t>::max())),
+ rand_callback_(base::Bind(rand_int_callback, 0, kuint16max)),
net_log_(net_log),
server_index_(0) {
socket_pool_->Initialize(&config_.nameservers, net_log);
@@ -107,8 +102,8 @@
RecordServerStats();
}
-uint16_t DnsSession::NextQueryId() const {
- return static_cast<uint16_t>(rand_callback_.Run());
+uint16 DnsSession::NextQueryId() const {
+ return static_cast<uint16>(rand_callback_.Run());
}
unsigned DnsSession::NextFirstServerIndex() {
« no previous file with comments | « net/dns/dns_session.h ('k') | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698