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

Side by Side Diff: chrome/test/chromedriver/net/net_util.h

Issue 1879863002: Reland of [chromedriver] Listen on IPv6 on IPv6-only hosts (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better logging Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/test/chromedriver/net/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) 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 CHROME_TEST_CHROMEDRIVER_NET_NET_UTIL_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_NET_NET_UTIL_H_
6 #define CHROME_TEST_CHROMEDRIVER_NET_NET_UTIL_H_ 6 #define CHROME_TEST_CHROMEDRIVER_NET_NET_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class URLRequestContextGetter; 10 class URLRequestContextGetter;
11 11
12 class NetAddress { 12 class NetAddress {
13 public: 13 public:
14 NetAddress(); // Creates an invalid address. 14 NetAddress(); // Creates an invalid address.
15 explicit NetAddress(int port); // Host is set to 127.0.0.1. 15 explicit NetAddress(int port); // Host is set to localhost.
16 NetAddress(const std::string& host, int port); 16 NetAddress(const std::string& host, int port);
17 ~NetAddress(); 17 ~NetAddress();
18 18
19 bool IsValid() const; 19 bool IsValid() const;
20 20
21 // Returns host:port. 21 // Returns host:port.
22 std::string ToString() const; 22 std::string ToString() const;
23 23
24 const std::string& host() const; 24 const std::string& host() const;
25 int port() const; 25 int port() const;
26 26
27 private: 27 private:
28 std::string host_; 28 std::string host_;
29 int port_; 29 int port_;
30 }; 30 };
31 31
32 // Synchronously fetches data from a GET HTTP request to the given URL. 32 // Synchronously fetches data from a GET HTTP request to the given URL.
33 // Returns true if response is 200 OK and sets response body to |response|. 33 // Returns true if response is 200 OK and sets response body to |response|.
34 bool FetchUrl(const std::string& url, 34 bool FetchUrl(const std::string& url,
35 URLRequestContextGetter* getter, 35 URLRequestContextGetter* getter,
36 std::string* response); 36 std::string* response);
37 37
38 #endif // CHROME_TEST_CHROMEDRIVER_NET_NET_UTIL_H_ 38 #endif // CHROME_TEST_CHROMEDRIVER_NET_NET_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/chromedriver/net/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698