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 "components/content_settings/core/common/content_settings_pattern_parse
r.h" | 5 #include "components/content_settings/core/common/content_settings_pattern_parse
r.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
8 #include "url/url_constants.h" | 10 #include "url/url_constants.h" |
9 | 11 |
10 namespace { | 12 namespace { |
11 | 13 |
12 const char kDomainWildcard[] = "[*.]"; | 14 const char kDomainWildcard[] = "[*.]"; |
13 const size_t kDomainWildcardLength = 4; | 15 const size_t kDomainWildcardLength = 4; |
14 const char kHostWildcard[] = "*"; | 16 const char kHostWildcard[] = "*"; |
15 const char kPathWildcard[] = "*"; | 17 const char kPathWildcard[] = "*"; |
16 const char kPortWildcard[] = "*"; | 18 const char kPortWildcard[] = "*"; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 } | 215 } |
214 | 216 |
215 if (!parts.is_port_wildcard) { | 217 if (!parts.is_port_wildcard) { |
216 str += std::string(kUrlPortSeparator) + parts.port; | 218 str += std::string(kUrlPortSeparator) + parts.port; |
217 } | 219 } |
218 | 220 |
219 return str; | 221 return str; |
220 } | 222 } |
221 | 223 |
222 } // namespace content_settings | 224 } // namespace content_settings |
OLD | NEW |