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..652ba932ba92403d5b89d9a6f0452809e299c234 100644 |
--- a/chrome/common/custom_handlers/protocol_handler.cc |
+++ b/chrome/common/custom_handlers/protocol_handler.cc |
@@ -8,6 +8,7 @@ |
#include "base/utf_string_conversions.h" |
#include "net/base/escape.h" |
+ |
ProtocolHandler::ProtocolHandler(const std::string& protocol, |
const GURL& url, |
const string16& title) |
@@ -70,6 +71,15 @@ DictionaryValue* ProtocolHandler::Encode() const { |
return d; |
} |
+#if !defined(NDEBUG) |
+std::string ProtocolHandler::ToString() const { |
+ return "{ protocol=" + protocol_ + |
+ ", url=" + url_.spec() + |
+ ", title=" + UTF16ToASCII(title_) + |
+ " }"; |
+} |
+#endif |
+ |
bool ProtocolHandler::operator==(const ProtocolHandler& other) const { |
return protocol_ == other.protocol_ && |
url_ == other.url_ && |