[email protected] | 716c016 | 2013-12-13 20:36:53 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 716c016 | 2013-12-13 20:36:53 | [diff] [blame] | 5 | #include "components/url_matcher/string_pattern.h" |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 6 | |
jsbell | dd1a3ea | 2015-11-20 19:07:39 | [diff] [blame] | 7 | #include <tuple> |
8 | |||||
[email protected] | 716c016 | 2013-12-13 20:36:53 | [diff] [blame] | 9 | namespace url_matcher { |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 10 | |
11 | StringPattern::StringPattern(const std::string& pattern, | ||||
12 | StringPattern::ID id) | ||||
13 | : pattern_(pattern), id_(id) {} | ||||
14 | |||||
15 | StringPattern::~StringPattern() {} | ||||
16 | |||||
17 | bool StringPattern::operator<(const StringPattern& rhs) const { | ||||
jsbell | dd1a3ea | 2015-11-20 19:07:39 | [diff] [blame] | 18 | return std::tie(id_, pattern_) < std::tie(rhs.id_, rhs.pattern_); |
[email protected] | 5bcf3b7 | 2012-09-14 00:20:28 | [diff] [blame] | 19 | } |
20 | |||||
[email protected] | 716c016 | 2013-12-13 20:36:53 | [diff] [blame] | 21 | } // namespace url_matcher |