summaryrefslogtreecommitdiffstats
path: root/net/base/net_util.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 17:10:12 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 17:10:12 +0000
commit58f0bf6f76dcf9cd4dc48b1699e5313d4694825a (patch)
tree9ee2dc502e9aeae348de4d1f610d9139378f5e5d /net/base/net_util.cc
parent15f633d4fde1ee0001ef4e1ecc0ca4d1ab8aaa43 (diff)
downloadchromium_src-58f0bf6f76dcf9cd4dc48b1699e5313d4694825a.zip
chromium_src-58f0bf6f76dcf9cd4dc48b1699e5313d4694825a.tar.gz
chromium_src-58f0bf6f76dcf9cd4dc48b1699e5313d4694825a.tar.bz2
Merge WebKit r42737, which added port 3659
(apple-sasl / PasswordServer) to the list of blocked ports and to LayoutTests/security/block-test.html. Fix cpplint.py nits. R=eroman BUG=http://crbug.com/10861 TEST=LayoutTests/security/block-test.html should pass on Windows Review URL: http://codereview.chromium.org/147069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.cc')
-rw-r--r--net/base/net_util.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index d7fa844..2e6292c 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -117,6 +117,7 @@ static const int kRestrictedPorts[] = {
993, // ldap+ssl
995, // pop3+ssl
2049, // nfs
+ 3659, // apple-sasl / PasswordServer
4045, // lockd
6000, // X11
};
@@ -483,9 +484,9 @@ bool IsCompatibleWithASCIILetters(const std::string& lang) {
// For now, just list Chinese, Japanese and Korean (positive list).
// An alternative is negative-listing (languages using Greek and
// Cyrillic letters), but it can be more dangerous.
- return !lang.substr(0,2).compare("zh") ||
- !lang.substr(0,2).compare("ja") ||
- !lang.substr(0,2).compare("ko");
+ return !lang.substr(0, 2).compare("zh") ||
+ !lang.substr(0, 2).compare("ja") ||
+ !lang.substr(0, 2).compare("ko");
}
// Returns true if the given Unicode host component is safe to display to the
@@ -939,15 +940,16 @@ std::wstring GetSuggestedFilename(const GURL& url,
// If there's no filename or it gets trimed to be empty, use
// the URL hostname or default_name
if (filename.empty()) {
- if (!default_name.empty())
+ if (!default_name.empty()) {
filename = default_name;
- else if (url.is_valid()) {
+ } else if (url.is_valid()) {
// Some schemes (e.g. file) do not have a hostname. Even though it's
// not likely to reach here, let's hardcode the last fallback name.
// TODO(jungshik) : Decode a 'punycoded' IDN hostname. (bug 1264451)
filename = url.host().empty() ? L"download" : UTF8ToWide(url.host());
- } else
+ } else {
NOTREACHED();
+ }
}
file_util::ReplaceIllegalCharacters(&filename, '-');