Index: net/base/net_util.h |
=================================================================== |
--- net/base/net_util.h (revision 25619) |
+++ net/base/net_util.h (working copy) |
@@ -12,6 +12,7 @@ |
#endif |
#include <string> |
+#include <set> |
#include "base/basictypes.h" |
#include "base/string16.h" |
@@ -35,6 +36,9 @@ |
namespace net { |
+// Holds a list of ports that should be accepted despite bans. |
+extern std::set<int> explicitly_allowed_ports; |
+ |
// Given the full path to a file name, creates a file: URL. The returned URL |
// may not be valid if the input is malformed. |
GURL FilePathToFileURL(const FilePath& path); |
@@ -191,6 +195,10 @@ |
// restricted. |
bool IsPortAllowedByFtp(int port); |
+// Check if banned |port| has been overriden by an entry in |
+// |explicitly_allowed_ports_|. |
+bool IsPortAllowedByOverride(int port); |
+ |
// Set socket to non-blocking mode |
int SetNonBlocking(int fd); |
@@ -230,6 +238,8 @@ |
// - reference section |
GURL SimplifyUrlForRequest(const GURL& url); |
+void SetExplicitlyAllowedPorts(const std::wstring& allowed_ports); |
+ |
} // namespace net |
#endif // NET_BASE_NET_UTIL_H__ |