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

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

Issue 1728033002: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 if (match_type_ == MATCH_ANY) 612 if (match_type_ == MATCH_ANY)
613 condition = factory->CreateQueryContainsCondition(key_ + value_); 613 condition = factory->CreateQueryContainsCondition(key_ + value_);
614 else 614 else
615 condition = factory->CreateQueryContainsCondition(key_); 615 condition = factory->CreateQueryContainsCondition(key_);
616 string_pattern_ = condition.string_pattern(); 616 string_pattern_ = condition.string_pattern();
617 617
618 key_length_ = key_.length(); 618 key_length_ = key_.length();
619 value_length_ = value_.length(); 619 value_length_ = value_.length();
620 } 620 }
621 621
622 URLQueryElementMatcherCondition::URLQueryElementMatcherCondition(
623 const URLQueryElementMatcherCondition& other) = default;
624
622 URLQueryElementMatcherCondition::~URLQueryElementMatcherCondition() {} 625 URLQueryElementMatcherCondition::~URLQueryElementMatcherCondition() {}
623 626
624 bool URLQueryElementMatcherCondition::operator<( 627 bool URLQueryElementMatcherCondition::operator<(
625 const URLQueryElementMatcherCondition& rhs) const { 628 const URLQueryElementMatcherCondition& rhs) const {
626 if (match_type_ != rhs.match_type_) 629 if (match_type_ != rhs.match_type_)
627 return match_type_ < rhs.match_type_; 630 return match_type_ < rhs.match_type_;
628 if (string_pattern_ != NULL && rhs.string_pattern_ != NULL) 631 if (string_pattern_ != NULL && rhs.string_pattern_ != NULL)
629 return *string_pattern_ < *rhs.string_pattern_; 632 return *string_pattern_ < *rhs.string_pattern_;
630 if (string_pattern_ == NULL && rhs.string_pattern_ != NULL) 633 if (string_pattern_ == NULL && rhs.string_pattern_ != NULL)
631 return true; 634 return true;
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 1100
1098 void URLMatcher::UpdateInternalDatastructures() { 1101 void URLMatcher::UpdateInternalDatastructures() {
1099 UpdateSubstringSetMatcher(false); 1102 UpdateSubstringSetMatcher(false);
1100 UpdateSubstringSetMatcher(true); 1103 UpdateSubstringSetMatcher(true);
1101 UpdateRegexSetMatcher(); 1104 UpdateRegexSetMatcher();
1102 UpdateTriggers(); 1105 UpdateTriggers();
1103 UpdateConditionFactory(); 1106 UpdateConditionFactory();
1104 } 1107 }
1105 1108
1106 } // namespace url_matcher 1109 } // namespace url_matcher
OLDNEW
« components/url_matcher/url_matcher.h ('K') | « components/url_matcher/url_matcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698