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

Unified Diff: chrome/common/custom_handlers/protocol_handler.cc

Issue 10559049: Add ToString method for easy DLOG and debug support (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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/custom_handlers/protocol_handler.cc
diff --git a/chrome/common/custom_handlers/protocol_handler.cc b/chrome/common/custom_handlers/protocol_handler.cc
index 4d61a415c62a3b1650c7044844f3fde115371492..d07ad123a8d60437a281b5e9cdf819559d7bbbf7 100644
--- a/chrome/common/custom_handlers/protocol_handler.cc
+++ b/chrome/common/custom_handlers/protocol_handler.cc
@@ -83,3 +83,11 @@ bool ProtocolHandler::IsEquivalent(const ProtocolHandler& other) const {
bool ProtocolHandler::operator<(const ProtocolHandler& other) const {
return title_ < other.title_;
}
+
+std::ostream& operator<<(std::ostream& os, const ProtocolHandler& handler) {
+ return os << "{ " <<
+ " protocol=" << handler.protocol() <<
+ " url=" << handler.url() <<
+ " title=" << UTF16ToUTF8(handler.title()) <<
+ " }";
+}
benwells 2012/06/22 19:47:48 nit: chrome style is to put the << at the beginnin

Powered by Google App Engine
This is Rietveld 408576698