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

Unified Diff: chrome/common/extensions/matcher/string_pattern.cc

Issue 10910179: Event matching by regular expression matching on URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ascii artiste Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/matcher/string_pattern.cc
diff --git a/chrome/common/extensions/matcher/string_pattern.cc b/chrome/common/extensions/matcher/string_pattern.cc
new file mode 100644
index 0000000000000000000000000000000000000000..673ed566fb6f3dff23869a9f9afa38c7d383a09b
--- /dev/null
+++ b/chrome/common/extensions/matcher/string_pattern.cc
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/extensions/matcher/string_pattern.h"
+
+namespace extensions {
+
+StringPattern::StringPattern(const std::string& pattern,
+ StringPattern::ID id)
+ : pattern_(pattern), id_(id) {}
+
+StringPattern::~StringPattern() {}
+
+bool StringPattern::operator<(const StringPattern& rhs) const {
+ if (id_ != rhs.id_) return id_ < rhs.id_;
+ return pattern_ < rhs.pattern_;
+}
+
+} // namespace extensions
« no previous file with comments | « chrome/common/extensions/matcher/string_pattern.h ('k') | chrome/common/extensions/matcher/string_pattern_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698