| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <unicode/ucnv.h> | 6 #include <unicode/ucnv.h> |
| 7 #include <unicode/uidna.h> | 7 #include <unicode/uidna.h> |
| 8 #include <unicode/ulocdata.h> | 8 #include <unicode/ulocdata.h> |
| 9 #include <unicode/uniset.h> | 9 #include <unicode/uniset.h> |
| 10 #include <unicode/uscript.h> | 10 #include <unicode/uscript.h> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "base/time_format.h" | 30 #include "base/time_format.h" |
| 31 #include "googleurl/src/gurl.h" | 31 #include "googleurl/src/gurl.h" |
| 32 #include "googleurl/src/url_canon.h" | 32 #include "googleurl/src/url_canon.h" |
| 33 #include "googleurl/src/url_parse.h" | 33 #include "googleurl/src/url_parse.h" |
| 34 #include "net/base/escape.h" | 34 #include "net/base/escape.h" |
| 35 #include "net/base/net_module.h" | 35 #include "net/base/net_module.h" |
| 36 #include "net/base/net_resources.h" | 36 #include "net/base/net_resources.h" |
| 37 #include "net/base/base64.h" | 37 #include "net/base/base64.h" |
| 38 #include "unicode/datefmt.h" | 38 #include "unicode/datefmt.h" |
| 39 | 39 |
| 40 using base::Time; |
| 41 |
| 40 namespace { | 42 namespace { |
| 41 | 43 |
| 42 // what we prepend to get a file URL | 44 // what we prepend to get a file URL |
| 43 static const wchar_t kFileURLPrefix[] = L"file:///"; | 45 static const wchar_t kFileURLPrefix[] = L"file:///"; |
| 44 | 46 |
| 45 // The general list of blocked ports. Will be blocked unless a specific | 47 // The general list of blocked ports. Will be blocked unless a specific |
| 46 // protocol overrides it. (Ex: ftp can use ports 20 and 21) | 48 // protocol overrides it. (Ex: ftp can use ports 20 and 21) |
| 47 static const int kRestrictedPorts[] = { | 49 static const int kRestrictedPorts[] = { |
| 48 1, // tcpmux | 50 1, // tcpmux |
| 49 7, // echo | 51 7, // echo |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 for (int i = 0; i < array_size; i++) { | 909 for (int i = 0; i < array_size; i++) { |
| 908 if (kAllowedFtpPorts[i] == port) { | 910 if (kAllowedFtpPorts[i] == port) { |
| 909 return true; | 911 return true; |
| 910 } | 912 } |
| 911 } | 913 } |
| 912 // Port not explicitly allowed by FTP, so return the default restrictions. | 914 // Port not explicitly allowed by FTP, so return the default restrictions. |
| 913 return IsPortAllowedByDefault(port); | 915 return IsPortAllowedByDefault(port); |
| 914 } | 916 } |
| 915 | 917 |
| 916 } // namespace net | 918 } // namespace net |
| OLD | NEW |