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

Unified Diff: mojo/edk/embedder/platform_channel_pair_posix.cc

Issue 1471693006: Remove kint32min. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint3
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 | « media/blink/buffered_resource_loader.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/platform_channel_pair_posix.cc
diff --git a/mojo/edk/embedder/platform_channel_pair_posix.cc b/mojo/edk/embedder/platform_channel_pair_posix.cc
index 7ad1eeaf01ac2003354775e17595e815e601dfb9..d0968606ef013fe5162adebbdf3252a0492e651f 100644
--- a/mojo/edk/embedder/platform_channel_pair_posix.cc
+++ b/mojo/edk/embedder/platform_channel_pair_posix.cc
@@ -5,10 +5,13 @@
#include "mojo/edk/embedder/platform_channel_pair.h"
#include <fcntl.h>
+#include <stdint.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
+#include <limits>
+
#include "base/command_line.h"
#include "base/logging.h"
#include "base/posix/global_descriptors.h"
@@ -48,7 +51,8 @@ PlatformChannelPair::PlatformChannelPair(bool client_is_blocking) {
// Store a common id in the SO_PEEK_OFF option (which we don't use since we
// don't peek) as a way of determining later if two sockets are connected to
// each other.
- int identifier = base::RandInt(kint32min, kint32max);
+ int identifier = base::RandInt(std::numeric_limits<int32_t>::min(),
+ std::numeric_limits<int32_t>::max());
setsockopt(fds[0], SOL_SOCKET, SO_PEEK_OFF, &identifier, sizeof(identifier));
setsockopt(fds[1], SOL_SOCKET, SO_PEEK_OFF, &identifier, sizeof(identifier));
« no previous file with comments | « media/blink/buffered_resource_loader.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698