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

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

Issue 2562113002: Fix header guards in //net. (Closed)
Patch Set: Created 4 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/android/network_change_notifier_factory_android.h ('k') | net/base/linked_hash_map.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_IP_ADDRESS_NET_H_ 5 #ifndef NET_BASE_IP_ADDRESS_H_
6 #define NET_BASE_IP_ADDRESS_NET_H_ 6 #define NET_BASE_IP_ADDRESS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/strings/string_piece.h" 15 #include "base/strings/string_piece.h"
16 #include "net/base/net_export.h" 16 #include "net/base/net_export.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // to IPv4MappedIPv6 conversions and only checks against full bytes. 198 // to IPv4MappedIPv6 conversions and only checks against full bytes.
199 template <size_t N> 199 template <size_t N>
200 bool IPAddressStartsWith(const IPAddress& address, const uint8_t (&prefix)[N]) { 200 bool IPAddressStartsWith(const IPAddress& address, const uint8_t (&prefix)[N]) {
201 if (address.size() < N) 201 if (address.size() < N)
202 return false; 202 return false;
203 return std::equal(prefix, prefix + N, address.bytes().begin()); 203 return std::equal(prefix, prefix + N, address.bytes().begin());
204 } 204 }
205 205
206 } // namespace net 206 } // namespace net
207 207
208 #endif // NET_BASE_IP_ADDRESS_NET_H_ 208 #endif // NET_BASE_IP_ADDRESS_H_
OLDNEW
« no previous file with comments | « net/android/network_change_notifier_factory_android.h ('k') | net/base/linked_hash_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698