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

Unified Diff: net/base/ip_endpoint.h

Issue 1708483002: Revert of Make IP Address related functions return the empty string when used on an invalid address. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/ip_address_unittest.cc ('k') | net/base/ip_endpoint_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ip_endpoint.h
diff --git a/net/base/ip_endpoint.h b/net/base/ip_endpoint.h
index a1c12296b3dca8b9b91913f1722e1187ebd8468e..34b378bdda365d1b16c9ba08743d36ae908f8f07 100644
--- a/net/base/ip_endpoint.h
+++ b/net/base/ip_endpoint.h
@@ -57,12 +57,11 @@
bool FromSockAddr(const struct sockaddr* address, socklen_t address_length)
WARN_UNUSED_RESULT;
- // Returns value as a string (e.g. "127.0.0.1:80"). Returns the empty string
- // when |address_| is invalid (the port will be ignored).
+ // Returns value as a string (e.g. "127.0.0.1:80"). The IP address must be
+ // valid.
std::string ToString() const;
- // As above, but without port. Returns the empty string when address_ is
- // invalid.
+ // As above, but without port.
std::string ToStringWithoutPort() const;
bool operator<(const IPEndPoint& that) const;
« no previous file with comments | « net/base/ip_address_unittest.cc ('k') | net/base/ip_endpoint_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698