Index: chrome/browser/extensions/api/declarative/substring_set_matcher.cc |
diff --git a/chrome/browser/extensions/api/declarative/substring_set_matcher.cc b/chrome/browser/extensions/api/declarative/substring_set_matcher.cc |
index 847fff9099a567b41cfb629f293d703c76c2b064..e507589bf13f6fc62c0ca338c1d56724d54258e6 100644 |
--- a/chrome/browser/extensions/api/declarative/substring_set_matcher.cc |
+++ b/chrome/browser/extensions/api/declarative/substring_set_matcher.cc |
@@ -92,6 +92,11 @@ bool SubstringSetMatcher::Match(const std::string& text, |
return old_number_of_matches != matches->size(); |
} |
+bool SubstringSetMatcher::IsCompletelyEmpty() const { |
+ // An empty tree consists of only the root node. |
+ return patterns_.empty() && tree_.size() == 1u; |
+} |
+ |
void SubstringSetMatcher::RebuildAhoCorasickTree() { |
tree_.clear(); |