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

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: Respond to review comments. 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
« no previous file with comments | « chrome/common/custom_handlers/protocol_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ &&
« no previous file with comments | « chrome/common/custom_handlers/protocol_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698