Chromium Code Reviews| Index: chrome/common/content_settings_pattern_parser.cc |
| diff --git a/chrome/common/content_settings_pattern_parser.cc b/chrome/common/content_settings_pattern_parser.cc |
| index 437ecb1f1a9109962a18379bf22082d3389b60a8..d1b99fabfc2926302e2f4832a0c1399b5857676b 100644 |
| --- a/chrome/common/content_settings_pattern_parser.cc |
| +++ b/chrome/common/content_settings_pattern_parser.cc |
| @@ -140,8 +140,9 @@ void PatternParser::Parse(const std::string& pattern_spec, |
| builder->WithDomainWildcard(); |
| } else if (StartsWithASCII(host, kDomainWildcard, true)) { |
| host = host.substr(kDomainWildcardLength); |
| - // If the host still contains a wildcard symbol then it is invalid. |
| - if (host.find(kHostWildcard) != std::string::npos) { |
| + // If the host contains a domain wildcard but no domain then it is |
|
Bernhard Bauer
2011/11/24 15:50:32
This would be a pattern that's just "[*.]"? I thin
markusheintz_
2011/11/24 16:37:51
True. Done
|
| + // invalid. |
| + if (host.empty()) { |
| builder->Invalid(); |
| return; |
| } else { |