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

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

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 months 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/url_formatter/url_formatter.cc ('k') | components/url_matcher/url_matcher.h » ('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 #ifndef COMPONENTS_URL_MATCHER_REGEX_SET_MATCHER_H_ 5 #ifndef COMPONENTS_URL_MATCHER_REGEX_SET_MATCHER_H_
6 #define COMPONENTS_URL_MATCHER_REGEX_SET_MATCHER_H_ 6 #define COMPONENTS_URL_MATCHER_REGEX_SET_MATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <set> 10 #include <set>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/memory/scoped_ptr.h"
14 #include "components/url_matcher/string_pattern.h" 14 #include "components/url_matcher/string_pattern.h"
15 #include "components/url_matcher/substring_set_matcher.h" 15 #include "components/url_matcher/substring_set_matcher.h"
16 #include "components/url_matcher/url_matcher_export.h" 16 #include "components/url_matcher/url_matcher_export.h"
17 17
18 namespace re2 { 18 namespace re2 {
19 class FilteredRE2; 19 class FilteredRE2;
20 } 20 }
21 21
22 namespace url_matcher { 22 namespace url_matcher {
23 23
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Clean up StringPatterns in |substring_patterns_|. 64 // Clean up StringPatterns in |substring_patterns_|.
65 void DeleteSubstringPatterns(); 65 void DeleteSubstringPatterns();
66 66
67 // Mapping of regex StringPattern::IDs to regexes. 67 // Mapping of regex StringPattern::IDs to regexes.
68 RegexMap regexes_; 68 RegexMap regexes_;
69 // Mapping of RE2IDs from FilteredRE2 (which are assigned in order) 69 // Mapping of RE2IDs from FilteredRE2 (which are assigned in order)
70 // to regex StringPattern::IDs. 70 // to regex StringPattern::IDs.
71 RE2IDMap re2_id_map_; 71 RE2IDMap re2_id_map_;
72 72
73 scoped_ptr<re2::FilteredRE2> filtered_re2_; 73 std::unique_ptr<re2::FilteredRE2> filtered_re2_;
74 scoped_ptr<SubstringSetMatcher> substring_matcher_; 74 std::unique_ptr<SubstringSetMatcher> substring_matcher_;
75 75
76 // The substring patterns from FilteredRE2, which are used in 76 // The substring patterns from FilteredRE2, which are used in
77 // |substring_matcher_| but whose lifetime is managed here. 77 // |substring_matcher_| but whose lifetime is managed here.
78 std::vector<const StringPattern*> substring_patterns_; 78 std::vector<const StringPattern*> substring_patterns_;
79 }; 79 };
80 80
81 } // namespace url_matcher 81 } // namespace url_matcher
82 82
83 #endif // COMPONENTS_URL_MATCHER_REGEX_SET_MATCHER_H_ 83 #endif // COMPONENTS_URL_MATCHER_REGEX_SET_MATCHER_H_
OLDNEW
« no previous file with comments | « components/url_formatter/url_formatter.cc ('k') | components/url_matcher/url_matcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698