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

Unified Diff: extensions/common/url_pattern.cc

Issue 300573002: Add stream operators for URLPattern and URLPatternSet and unit test for URLPatternSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src@permissions
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: extensions/common/url_pattern.cc
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index 020be3c40dfb4b64cab952257bc90cfddcc9271e..80d4196b8984917e935f281d10cf8c2f711a1c20 100644
--- a/extensions/common/url_pattern.cc
+++ b/extensions/common/url_pattern.cc
@@ -148,6 +148,10 @@ bool URLPattern::operator==(const URLPattern& other) const {
return GetAsString() == other.GetAsString();
}
+std::ostream& operator<<(std::ostream& out, const URLPattern& url_pattern) {
+ return out << '"' << url_pattern.GetAsString() << '"';
Jeffrey Yasskin 2014/05/28 21:06:08 Similarly, #include <ostream> for this.
aboxhall 2014/05/28 22:06:44 Done.
+}
+
URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) {
spec_.clear();
SetMatchAllURLs(false);

Powered by Google App Engine
This is Rietveld 408576698