| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/port_util.h" | 5 #include "net/base/port_util.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 995, // pop3+ssl | 77 995, // pop3+ssl |
| 78 2049, // nfs | 78 2049, // nfs |
| 79 3659, // apple-sasl / PasswordServer | 79 3659, // apple-sasl / PasswordServer |
| 80 4045, // lockd | 80 4045, // lockd |
| 81 6000, // X11 | 81 6000, // X11 |
| 82 6665, // Alternate IRC [Apple addition] | 82 6665, // Alternate IRC [Apple addition] |
| 83 6666, // Alternate IRC [Apple addition] | 83 6666, // Alternate IRC [Apple addition] |
| 84 6667, // Standard IRC [Apple addition] | 84 6667, // Standard IRC [Apple addition] |
| 85 6668, // Alternate IRC [Apple addition] | 85 6668, // Alternate IRC [Apple addition] |
| 86 6669, // Alternate IRC [Apple addition] | 86 6669, // Alternate IRC [Apple addition] |
| 87 6697, // IRC + TLS |
| 87 0xFFFF, // Used to block all invalid port numbers (see | 88 0xFFFF, // Used to block all invalid port numbers (see |
| 88 // third_party/WebKit/Source/platform/weborigin/KURL.cpp, | 89 // third_party/WebKit/Source/platform/weborigin/KURL.cpp, |
| 89 // KURL::port()) | 90 // KURL::port()) |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 // FTP overrides the following restricted ports. | 93 // FTP overrides the following restricted ports. |
| 93 const int kAllowedFtpPorts[] = { | 94 const int kAllowedFtpPorts[] = { |
| 94 21, // ftp data | 95 21, // ftp data |
| 95 22, // ssh | 96 22, // ssh |
| 96 }; | 97 }; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 ScopedPortException::~ScopedPortException() { | 179 ScopedPortException::~ScopedPortException() { |
| 179 std::multiset<int>::iterator it = | 180 std::multiset<int>::iterator it = |
| 180 g_explicitly_allowed_ports.Get().find(port_); | 181 g_explicitly_allowed_ports.Get().find(port_); |
| 181 if (it != g_explicitly_allowed_ports.Get().end()) | 182 if (it != g_explicitly_allowed_ports.Get().end()) |
| 182 g_explicitly_allowed_ports.Get().erase(it); | 183 g_explicitly_allowed_ports.Get().erase(it); |
| 183 else | 184 else |
| 184 NOTREACHED(); | 185 NOTREACHED(); |
| 185 } | 186 } |
| 186 | 187 |
| 187 } // namespace net | 188 } // namespace net |
| OLD | NEW |