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

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: Don't override << for debug string support. 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..0b77ad161334639879eb4631540dc66b42990dc1 100644
--- a/chrome/common/custom_handlers/protocol_handler.cc
+++ b/chrome/common/custom_handlers/protocol_handler.cc
@@ -70,6 +70,14 @@ DictionaryValue* ProtocolHandler::Encode() const {
return d;
}
+std::string ProtocolHandler::ToString() const {
+ return std::string("{ ") +
Peter Kasting 2012/06/22 22:10:06 Nit: I'd probably write/wrap as: return "{ prot
Steve McKay 2012/06/22 22:40:01 Sorry. Mailed before I compiled :( Had to add som
+ " protocol=" + protocol +
+ ", url=" + url +
+ ", title=" + title +
+ " }";
+}
+
bool ProtocolHandler::operator==(const ProtocolHandler& other) const {
return protocol_ == other.protocol_ &&
url_ == other.url_ &&

Powered by Google App Engine
This is Rietveld 408576698