OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/content_settings/content_settings_pattern.h" | 5 #include "chrome/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/string_split.h" | 10 #include "base/string_split.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "chrome/browser/content_settings/content_settings_pattern_parser.h" | 12 #include "chrome/common/content_settings_pattern_parser.h" |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
14 #include "net/base/dns_util.h" | 14 #include "net/base/dns_util.h" |
15 #include "net/base/net_util.h" | 15 #include "net/base/net_util.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 #include "googleurl/src/url_canon.h" | 17 #include "googleurl/src/url_canon.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 std::string GetDefaultPort(const std::string& scheme) { | 21 std::string GetDefaultPort(const std::string& scheme) { |
22 if (scheme == chrome::kHttpScheme) | 22 if (scheme == chrome::kHttpScheme) |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 if (!parts.is_port_wildcard && other_parts.is_port_wildcard) | 601 if (!parts.is_port_wildcard && other_parts.is_port_wildcard) |
602 return ContentSettingsPattern::PREDECESSOR; | 602 return ContentSettingsPattern::PREDECESSOR; |
603 | 603 |
604 int result = parts.port.compare(other_parts.port); | 604 int result = parts.port.compare(other_parts.port); |
605 if (result == 0) | 605 if (result == 0) |
606 return ContentSettingsPattern::IDENTITY; | 606 return ContentSettingsPattern::IDENTITY; |
607 if (result > 0) | 607 if (result > 0) |
608 return ContentSettingsPattern::DISJOINT_ORDER_PRE; | 608 return ContentSettingsPattern::DISJOINT_ORDER_PRE; |
609 return ContentSettingsPattern::DISJOINT_ORDER_POST; | 609 return ContentSettingsPattern::DISJOINT_ORDER_POST; |
610 } | 610 } |
OLD | NEW |