From 72569645fdd3ab18b27466e5d32149b2d2ed1172 Mon Sep 17 00:00:00 2001 From: "ericroman@google.com" Date: Wed, 8 Oct 2008 18:40:05 +0000 Subject: Pull in new googleurl@94 which includes GURL::EffectiveIntPort(). Update callers to use this method. Review URL: http://codereview.chromium.org/5641 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3024 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/net_util.cc | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'net/base/net_util.cc') diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 57448af..305cbcc 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -913,26 +913,4 @@ bool IsPortAllowedByFtp(int port) { return IsPortAllowedByDefault(port); } -std::string GetImplicitPort(const GURL& url) { - if (url.has_port()) - return url.port(); - - // TODO(eroman): unify with DefaultPortForScheme() - // [url_canon_stdurl.cc] - - static const struct { - const char* scheme; - const char* port; - } scheme_map[] = { - { "http", "80" }, - { "https", "443" }, - { "ftp", "21" } - }; - for (int i = 0; i < static_cast(ARRAYSIZE_UNSAFE(scheme_map)); ++i) { - if (url.SchemeIs(scheme_map[i].scheme)) - return scheme_map[i].port; - } - return std::string(""); -} - } // namespace net -- cgit v1.1