| OLD | NEW | 
|---|
| 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_UTIL_H_ | 5 #ifndef NET_BASE_NET_UTIL_H_ | 
| 6 #define NET_BASE_NET_UTIL_H_ | 6 #define NET_BASE_NET_UTIL_H_ | 
| 7 | 7 | 
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" | 
| 9 | 9 | 
| 10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) | 
| 11 #include <sys/socket.h> | 11 #include <sys/socket.h> | 
| 12 #include <sys/types.h> | 12 #include <sys/types.h> | 
| 13 #elif defined(OS_WIN) | 13 #elif defined(OS_WIN) | 
| 14 #include <winsock2.h> | 14 #include <winsock2.h> | 
| 15 #include <ws2tcpip.h> | 15 #include <ws2tcpip.h> | 
| 16 #endif | 16 #endif | 
| 17 | 17 | 
|  | 18 #include <stddef.h> | 
| 18 #include <stdint.h> | 19 #include <stdint.h> | 
|  | 20 | 
| 19 #include <string> | 21 #include <string> | 
| 20 #include <vector> | 22 #include <vector> | 
| 21 | 23 | 
| 22 #include "base/strings/string16.h" | 24 #include "base/strings/string16.h" | 
| 23 #include "base/strings/string_piece.h" | 25 #include "base/strings/string_piece.h" | 
| 24 #include "net/base/net_export.h" | 26 #include "net/base/net_export.h" | 
| 25 | 27 | 
| 26 class GURL; | 28 class GURL; | 
| 27 | 29 | 
| 28 namespace base { | 30 namespace base { | 
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 184 // machine. | 186 // machine. | 
| 185 NET_EXPORT_PRIVATE bool IsLocalhost(base::StringPiece host); | 187 NET_EXPORT_PRIVATE bool IsLocalhost(base::StringPiece host); | 
| 186 | 188 | 
| 187 // Returns true if the url's host is a Google server. This should only be used | 189 // Returns true if the url's host is a Google server. This should only be used | 
| 188 // for histograms and shouldn't be used to affect behavior. | 190 // for histograms and shouldn't be used to affect behavior. | 
| 189 NET_EXPORT_PRIVATE bool HasGoogleHost(const GURL& url); | 191 NET_EXPORT_PRIVATE bool HasGoogleHost(const GURL& url); | 
| 190 | 192 | 
| 191 }  // namespace net | 193 }  // namespace net | 
| 192 | 194 | 
| 193 #endif  // NET_BASE_NET_UTIL_H_ | 195 #endif  // NET_BASE_NET_UTIL_H_ | 
| OLD | NEW | 
|---|