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

Unified Diff: net/base/net_util.h

Issue 1131813004: Revert of Create net::FormatOriginForDisplay helper function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « base/strings/utf_string_conversions.h ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.h
diff --git a/net/base/net_util.h b/net/base/net_util.h
index 03da43df1aa43477400ee01ea6fc1aaaefaee00e..32e2287f9092867b9ab819e459253a3f13979b50 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -58,7 +58,7 @@
static const size_t kBluetoothAddressSize = 6;
#endif
-// Nothing is omitted.
+// Nothing is ommitted.
NET_EXPORT extern const FormatUrlType kFormatUrlOmitNothing;
// If set, any username and password are removed.
@@ -71,13 +71,13 @@
// meaningful for non-file "standard" URLs.
NET_EXPORT extern const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname;
-// Convenience for omitting all unnecessary types.
+// Convenience for omitting all unecessary types.
NET_EXPORT extern const FormatUrlType kFormatUrlOmitAll;
// Returns the number of explicitly allowed ports; for testing.
NET_EXPORT_PRIVATE extern size_t GetCountOfExplicitlyAllowedPorts();
-// Splits an input of the form <host>[":"<port>] into its constituent parts.
+// Splits an input of the form <host>[":"<port>] into its consitituent parts.
// Saves the result into |*host| and |*port|. If the input did not have
// the optional port, sets |*port| to -1.
// Returns true if the parsing was successful, false otherwise.
@@ -105,13 +105,13 @@
NET_EXPORT_PRIVATE std::string GetHostAndOptionalPort(const GURL& url);
// Returns true if |hostname| contains a non-registerable or non-assignable
-// domain name (e.g.: a gTLD that has not been assigned by IANA) or an IP
-// address that falls in an IANA-reserved range.
+// domain name (eg: a gTLD that has not been assigned by IANA) or an IP address
+// that falls in an IANA-reserved range.
NET_EXPORT bool IsHostnameNonUnique(const std::string& hostname);
// Returns true if an IP address hostname is in a range reserved by the IANA.
// Works with both IPv4 and IPv6 addresses, and only compares against a given
-// protocol's reserved ranges.
+// protocols's reserved ranges.
NET_EXPORT bool IsIPAddressReserved(const IPAddressNumber& address);
// Convenience struct for when you need a |struct sockaddr|.
@@ -339,26 +339,6 @@
NULL, NULL, NULL);
}
-// This is a convenience function for formatting a URL as an origin in a concise
-// and human-friendly way. Use this instead of |FormatUrl| when the reader needs
-// only to understand the origin (rather than the entire URL).
-//
-// - Omits the path for standard schemes, excepting file and filesystem.
-// - Omits the port if it is the default for the scheme.
-//
-// Do not use this for URLs which will be parsed or sent to other applications.
-//
-// Callers should only set |omit_scheme| to true when it is safe to do so: in
-// contexts where the origin is known to be secure or is always secure by
-// necessity. As examples:
-//
-// display = FormatOriginForDisplay(url, ..., url.SchemeIsCryptographic());
-//
-// display = FormatOriginForDisplay(url, ..., IsOriginSecure(url));
-NET_EXPORT base::string16 FormatOriginForDisplay(const GURL& origin,
- const std::string& languages,
- bool omit_scheme);
-
// Returns whether FormatUrl() would strip a trailing slash from |url|, given a
// format flag including kFormatUrlOmitTrailingSlashOnBareHostname.
NET_EXPORT bool CanStripTrailingSlash(const GURL& url);
@@ -461,7 +441,7 @@
NET_EXPORT_PRIVATE bool IsLocalhostTLD(const std::string& host);
-// Returns true if the URL's host is a Google server. This should only be used
+// Returns true if the url's host is a Google server. This should only be used
// for histograms and shouldn't be used to affect behavior.
NET_EXPORT_PRIVATE bool HasGoogleHost(const GURL& url);
« no previous file with comments | « base/strings/utf_string_conversions.h ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698