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

Unified Diff: remoting/protocol/jingle_session.cc

Issue 1502503004: Remove kuint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8
Patch Set: rebase 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 | « ppapi/proxy/websocket_resource.cc ('k') | storage/common/blob_storage/blob_item_bytes_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session.cc
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index 4903fc45d9cc7c30f455fa2eefdb92bb72de4707..92b56c823c0caa23dc3d7bb3328a8f3df49378a0 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -4,6 +4,10 @@
#include "remoting/protocol/jingle_session.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/bind.h"
#include "base/rand_util.h"
#include "base/single_thread_task_runner.h"
@@ -98,7 +102,8 @@ void JingleSession::StartConnection(const std::string& peer_jid,
// concurrent session per host, so a random 64-bit integer provides
// enough entropy. In the worst case connection will fail when two
// clients generate the same session ID concurrently.
- session_id_ = base::Uint64ToString(base::RandGenerator(kuint64max));
+ session_id_ = base::Uint64ToString(
+ base::RandGenerator(std::numeric_limits<uint64_t>::max()));
transport_ = session_manager_->transport_factory_->CreateTransport();
« no previous file with comments | « ppapi/proxy/websocket_resource.cc ('k') | storage/common/blob_storage/blob_item_bytes_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698