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

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

Issue 38001: Implement the PAC js-binding for "myIpAddress()". (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: update unittest for DnsResolve based on new empty string Created 11 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/net_util.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include <string> 10 #include <string>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 std::string* host, 51 std::string* host,
52 int* port); 52 int* port);
53 bool GetHostAndPort(const std::string& host_and_port, 53 bool GetHostAndPort(const std::string& host_and_port,
54 std::string* host, 54 std::string* host,
55 int* port); 55 int* port);
56 56
57 // Returns the string representation of an address, like "192.168.0.1". 57 // Returns the string representation of an address, like "192.168.0.1".
58 // Returns empty string on failure. 58 // Returns empty string on failure.
59 std::string NetAddressToString(const struct addrinfo* net_address); 59 std::string NetAddressToString(const struct addrinfo* net_address);
60 60
61 // Returns the hostname of the current system. Returns empty string on failure.
62 std::string GetMyHostName();
63
61 // Return the value of the HTTP response header with name 'name'. 'headers' 64 // Return the value of the HTTP response header with name 'name'. 'headers'
62 // should be in the format that URLRequest::GetResponseHeaders() returns. 65 // should be in the format that URLRequest::GetResponseHeaders() returns.
63 // Returns the empty string if the header is not found. 66 // Returns the empty string if the header is not found.
64 std::wstring GetSpecificHeader(const std::wstring& headers, 67 std::wstring GetSpecificHeader(const std::wstring& headers,
65 const std::wstring& name); 68 const std::wstring& name);
66 std::string GetSpecificHeader(const std::string& headers, 69 std::string GetSpecificHeader(const std::string& headers,
67 const std::string& name); 70 const std::string& name);
68 71
69 // Return the value of the HTTP response header field's parameter named 72 // Return the value of the HTTP response header field's parameter named
70 // 'param_name'. Returns the empty string if the parameter is not found or is 73 // 'param_name'. Returns the empty string if the parameter is not found or is
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // restricted. 158 // restricted.
156 bool IsPortAllowedByFtp(int port); 159 bool IsPortAllowedByFtp(int port);
157 160
158 // Set socket to non-blocking mode 161 // Set socket to non-blocking mode
159 int SetNonBlocking(int fd); 162 int SetNonBlocking(int fd);
160 163
161 } // namespace net 164 } // namespace net
162 165
163 #endif // NET_BASE_NET_UTIL_H__ 166 #endif // NET_BASE_NET_UTIL_H__
164 167
OLDNEW
« no previous file with comments | « no previous file | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698