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

Unified Diff: net/base/ip_address.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 | « no previous file | net/base/ip_address_number.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ip_address.h
diff --git a/net/base/ip_address.h b/net/base/ip_address.h
index 3969f02d3b0ef97878f619c6ffb5a3b210261d27..d6c3490519c70cc93964d509072771b1c9b344aa 100644
--- a/net/base/ip_address.h
+++ b/net/base/ip_address.h
@@ -69,8 +69,8 @@
bool empty() const { return ip_address_.empty(); }
// Returns the canonical string representation of an IP address.
- // For example: "192.168.0.1" or "::1". Returns the empty string when
- // |ip_address_| is invalid.
+ // For example: "192.168.0.1" or "::1". The IP address must be
+ // valid, calling this on an invalid address will result in a crash.
std::string ToString() const;
// Parses an IP address literal (either IPv4 or IPv6) to its numeric value.
« no previous file with comments | « no previous file | net/base/ip_address_number.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698