Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1117)

Side by Side Diff: components/url_matcher/regex_set_matcher.cc

Issue 1544433002: Replace RE2 import with a dependency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-Added LICENSE and OWNERS file Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/policy/core/common/schema.cc ('k') | components/url_matcher/url_matcher_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "components/url_matcher/substring_set_matcher.h" 10 #include "components/url_matcher/substring_set_matcher.h"
11 #include "third_party/re2/re2/filtered_re2.h" 11 #include "third_party/re2/src/re2/filtered_re2.h"
12 #include "third_party/re2/re2/re2.h" 12 #include "third_party/re2/src/re2/re2.h"
13 13
14 namespace url_matcher { 14 namespace url_matcher {
15 15
16 RegexSetMatcher::RegexSetMatcher() {} 16 RegexSetMatcher::RegexSetMatcher() {}
17 17
18 RegexSetMatcher::~RegexSetMatcher() { 18 RegexSetMatcher::~RegexSetMatcher() {
19 DeleteSubstringPatterns(); 19 DeleteSubstringPatterns();
20 } 20 }
21 21
22 void RegexSetMatcher::AddPatterns( 22 void RegexSetMatcher::AddPatterns(
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 new StringPattern(strings_to_match[i], i)); 103 new StringPattern(strings_to_match[i], i));
104 } 104 }
105 substring_matcher_->RegisterPatterns(substring_patterns_); 105 substring_matcher_->RegisterPatterns(substring_patterns_);
106 } 106 }
107 107
108 void RegexSetMatcher::DeleteSubstringPatterns() { 108 void RegexSetMatcher::DeleteSubstringPatterns() {
109 STLDeleteElements(&substring_patterns_); 109 STLDeleteElements(&substring_patterns_);
110 } 110 }
111 111
112 } // namespace url_matcher 112 } // namespace url_matcher
OLDNEW
« no previous file with comments | « components/policy/core/common/schema.cc ('k') | components/url_matcher/url_matcher_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698