OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/url_matcher/regex_set_matcher.h" | 5 #include "components/url_matcher/regex_set_matcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Build SubstringSetMatcher from |strings_to_match|. | 101 // Build SubstringSetMatcher from |strings_to_match|. |
102 // SubstringSetMatcher doesn't own its strings. | 102 // SubstringSetMatcher doesn't own its strings. |
103 for (size_t i = 0; i < strings_to_match.size(); ++i) { | 103 for (size_t i = 0; i < strings_to_match.size(); ++i) { |
104 substring_patterns_.push_back( | 104 substring_patterns_.push_back( |
105 new StringPattern(strings_to_match[i], i)); | 105 new StringPattern(strings_to_match[i], i)); |
106 } | 106 } |
107 substring_matcher_->RegisterPatterns(substring_patterns_); | 107 substring_matcher_->RegisterPatterns(substring_patterns_); |
108 } | 108 } |
109 | 109 |
110 void RegexSetMatcher::DeleteSubstringPatterns() { | 110 void RegexSetMatcher::DeleteSubstringPatterns() { |
111 STLDeleteElements(&substring_patterns_); | 111 base::STLDeleteElements(&substring_patterns_); |
112 } | 112 } |
113 | 113 |
114 } // namespace url_matcher | 114 } // namespace url_matcher |
OLD | NEW |