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

Side by Side Diff: net/base/port_util.h

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef 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 unified diff | Download patch
« no previous file with comments | « net/base/openssl_private_key_store_memory.cc ('k') | net/base/prioritized_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_NET_PORT_UTIL_ 5 #ifndef NET_BASE_NET_PORT_UTIL_
6 #define NET_BASE_NET_PORT_UTIL_ 6 #define NET_BASE_NET_PORT_UTIL_
7 7
8 #include <stddef.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h" 12 #include "base/macros.h"
11 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
12 14
13 namespace net { 15 namespace net {
14 16
15 // Checks if |port| is in the valid range (0 to 65535, though 0 is technically 17 // Checks if |port| is in the valid range (0 to 65535, though 0 is technically
16 // reserved). Should be used before casting a port to a uint16_t. 18 // reserved). Should be used before casting a port to a uint16_t.
17 NET_EXPORT bool IsPortValid(int port); 19 NET_EXPORT bool IsPortValid(int port);
18 20
19 // Returns true if the port is in the range [0, 1023]. These ports are 21 // Returns true if the port is in the range [0, 1023]. These ports are
20 // registered by IANA and typically need root access to listen on. 22 // registered by IANA and typically need root access to listen on.
(...skipping 16 matching lines...) Expand all
37 39
38 private: 40 private:
39 int port_; 41 int port_;
40 42
41 DISALLOW_COPY_AND_ASSIGN(ScopedPortException); 43 DISALLOW_COPY_AND_ASSIGN(ScopedPortException);
42 }; 44 };
43 45
44 } // namespace net 46 } // namespace net
45 47
46 #endif // NET_BASE_NET_PORT_UTIL_ 48 #endif // NET_BASE_NET_PORT_UTIL_
OLDNEW
« no previous file with comments | « net/base/openssl_private_key_store_memory.cc ('k') | net/base/prioritized_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698