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

Unified Diff: net/dns/dns_session.cc

Issue 1475803002: Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: cloud print 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 9ea2db9a20a2bfe4edea72b1d59ff2dba705b4e4..3a6c4d4610f13147e0e051c50edc08b000857c1f 100644
--- a/net/dns/dns_session.cc
+++ b/net/dns/dns_session.cc
@@ -4,7 +4,10 @@
#include "net/dns/dns_session.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/metrics/histogram_macros.h"
@@ -86,7 +89,9 @@ DnsSession::DnsSession(const DnsConfig& config,
NetLog* net_log)
: config_(config),
socket_pool_(socket_pool.Pass()),
- rand_callback_(base::Bind(rand_int_callback, 0, kuint16max)),
+ rand_callback_(base::Bind(rand_int_callback,
+ 0,
+ std::numeric_limits<uint16_t>::max())),
net_log_(net_log),
server_index_(0) {
socket_pool_->Initialize(&config_.nameservers, net_log);
@@ -102,8 +107,8 @@ DnsSession::~DnsSession() {
RecordServerStats();
}
-uint16 DnsSession::NextQueryId() const {
- return static_cast<uint16>(rand_callback_.Run());
+uint16_t DnsSession::NextQueryId() const {
+ return static_cast<uint16_t>(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