summaryrefslogtreecommitdiffstats
path: root/extensions/common/url_pattern.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/common/url_pattern.cc')
-rw-r--r--extensions/common/url_pattern.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index b91d438..502c459 100644
--- a/extensions/common/url_pattern.cc
+++ b/extensions/common/url_pattern.cc
@@ -237,12 +237,11 @@ URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) {
host_ = pattern.substr(host_start_pos, host_end_pos - host_start_pos);
// The first component can optionally be '*' to match all subdomains.
- std::vector<std::string> host_components = base::SplitString(
- host_, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ std::vector<std::string> host_components;
+ base::SplitString(host_, '.', &host_components);
// Could be empty if the host only consists of whitespace characters.
- if (host_components.empty() ||
- (host_components.size() == 1 && host_components[0].empty()))
+ if (host_components.empty())
return PARSE_ERROR_EMPTY_HOST;
if (host_components[0] == "*") {