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

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

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, 8 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_matcher/url_matcher.h ('k') | components/url_matcher/url_matcher_factory.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 #include "components/url_matcher/url_matcher.h" 5 #include "components/url_matcher/url_matcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 735
736 URLMatcherConditionSet::URLMatcherConditionSet( 736 URLMatcherConditionSet::URLMatcherConditionSet(
737 ID id, 737 ID id,
738 const Conditions& conditions) 738 const Conditions& conditions)
739 : id_(id), 739 : id_(id),
740 conditions_(conditions) {} 740 conditions_(conditions) {}
741 741
742 URLMatcherConditionSet::URLMatcherConditionSet( 742 URLMatcherConditionSet::URLMatcherConditionSet(
743 ID id, 743 ID id,
744 const Conditions& conditions, 744 const Conditions& conditions,
745 scoped_ptr<URLMatcherSchemeFilter> scheme_filter, 745 std::unique_ptr<URLMatcherSchemeFilter> scheme_filter,
746 scoped_ptr<URLMatcherPortFilter> port_filter) 746 std::unique_ptr<URLMatcherPortFilter> port_filter)
747 : id_(id), 747 : id_(id),
748 conditions_(conditions), 748 conditions_(conditions),
749 scheme_filter_(std::move(scheme_filter)), 749 scheme_filter_(std::move(scheme_filter)),
750 port_filter_(std::move(port_filter)) {} 750 port_filter_(std::move(port_filter)) {}
751 751
752 URLMatcherConditionSet::URLMatcherConditionSet( 752 URLMatcherConditionSet::URLMatcherConditionSet(
753 ID id, 753 ID id,
754 const Conditions& conditions, 754 const Conditions& conditions,
755 const QueryConditions& query_conditions, 755 const QueryConditions& query_conditions,
756 scoped_ptr<URLMatcherSchemeFilter> scheme_filter, 756 std::unique_ptr<URLMatcherSchemeFilter> scheme_filter,
757 scoped_ptr<URLMatcherPortFilter> port_filter) 757 std::unique_ptr<URLMatcherPortFilter> port_filter)
758 : id_(id), 758 : id_(id),
759 conditions_(conditions), 759 conditions_(conditions),
760 query_conditions_(query_conditions), 760 query_conditions_(query_conditions),
761 scheme_filter_(std::move(scheme_filter)), 761 scheme_filter_(std::move(scheme_filter)),
762 port_filter_(std::move(port_filter)) {} 762 port_filter_(std::move(port_filter)) {}
763 763
764 bool URLMatcherConditionSet::IsMatch( 764 bool URLMatcherConditionSet::IsMatch(
765 const std::set<StringPattern::ID>& matching_patterns, 765 const std::set<StringPattern::ID>& matching_patterns,
766 const GURL& url) const { 766 const GURL& url) const {
767 return IsMatch(matching_patterns, url, std::string()); 767 return IsMatch(matching_patterns, url, std::string());
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 1100
1101 void URLMatcher::UpdateInternalDatastructures() { 1101 void URLMatcher::UpdateInternalDatastructures() {
1102 UpdateSubstringSetMatcher(false); 1102 UpdateSubstringSetMatcher(false);
1103 UpdateSubstringSetMatcher(true); 1103 UpdateSubstringSetMatcher(true);
1104 UpdateRegexSetMatcher(); 1104 UpdateRegexSetMatcher();
1105 UpdateTriggers(); 1105 UpdateTriggers();
1106 UpdateConditionFactory(); 1106 UpdateConditionFactory();
1107 } 1107 }
1108 1108
1109 } // namespace url_matcher 1109 } // namespace url_matcher
OLDNEW
« no previous file with comments | « components/url_matcher/url_matcher.h ('k') | components/url_matcher/url_matcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698