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 "chrome/common/extensions/matcher/regex_set_matcher.h" | 5 #include "extensions/common/matcher/regex_set_matcher.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" |
8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
9 #include "base/stl_util.h" | 10 #include "extensions/common/matcher/substring_set_matcher.h" |
10 #include "chrome/common/extensions/matcher/substring_set_matcher.h" | |
11 #include "third_party/re2/re2/filtered_re2.h" | 11 #include "third_party/re2/re2/filtered_re2.h" |
12 #include "third_party/re2/re2/re2.h" | 12 #include "third_party/re2/re2/re2.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 RegexSetMatcher::RegexSetMatcher() {} | 16 RegexSetMatcher::RegexSetMatcher() {} |
17 | 17 |
18 RegexSetMatcher::~RegexSetMatcher() { | 18 RegexSetMatcher::~RegexSetMatcher() { |
19 DeleteSubstringPatterns(); | 19 DeleteSubstringPatterns(); |
20 } | 20 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 new StringPattern(strings_to_match[i], i)); | 101 new StringPattern(strings_to_match[i], i)); |
102 } | 102 } |
103 substring_matcher_->RegisterPatterns(substring_patterns_); | 103 substring_matcher_->RegisterPatterns(substring_patterns_); |
104 } | 104 } |
105 | 105 |
106 void RegexSetMatcher::DeleteSubstringPatterns() { | 106 void RegexSetMatcher::DeleteSubstringPatterns() { |
107 STLDeleteElements(&substring_patterns_); | 107 STLDeleteElements(&substring_patterns_); |
108 } | 108 } |
109 | 109 |
110 } // namespace extensions | 110 } // namespace extensions |
OLD | NEW |