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 "chrome/common/content_settings_pattern.h" | 5 #include "components/content_settings/core/common/content_settings_pattern.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "chrome/common/content_settings_pattern_parser.h" | 12 #include "components/content_settings/core/common/content_settings_pattern_parse
r.h" |
13 #include "net/base/dns_util.h" | 13 #include "net/base/dns_util.h" |
14 #include "net/base/net_util.h" | 14 #include "net/base/net_util.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // The component supports only one scheme for simplicity. | 19 // The component supports only one scheme for simplicity. |
20 const char* non_port_non_domain_wildcard_scheme = NULL; | 20 const char* non_port_non_domain_wildcard_scheme = NULL; |
21 | 21 |
22 std::string GetDefaultPort(const std::string& scheme) { | 22 std::string GetDefaultPort(const std::string& scheme) { |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 if (!parts.is_port_wildcard && other_parts.is_port_wildcard) | 702 if (!parts.is_port_wildcard && other_parts.is_port_wildcard) |
703 return ContentSettingsPattern::PREDECESSOR; | 703 return ContentSettingsPattern::PREDECESSOR; |
704 | 704 |
705 int result = parts.port.compare(other_parts.port); | 705 int result = parts.port.compare(other_parts.port); |
706 if (result == 0) | 706 if (result == 0) |
707 return ContentSettingsPattern::IDENTITY; | 707 return ContentSettingsPattern::IDENTITY; |
708 if (result > 0) | 708 if (result > 0) |
709 return ContentSettingsPattern::DISJOINT_ORDER_PRE; | 709 return ContentSettingsPattern::DISJOINT_ORDER_PRE; |
710 return ContentSettingsPattern::DISJOINT_ORDER_POST; | 710 return ContentSettingsPattern::DISJOINT_ORDER_POST; |
711 } | 711 } |
OLD | NEW |