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

Issue 10559049: Add ToString method for easy DLOG and debug support (Closed)

Created:
8 years, 6 months ago by Steve McKay
Modified:
8 years, 5 months ago
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Override << operator for easier debugging. BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144638

Patch Set 1 #

Total comments: 3

Patch Set 2 : Don't override << for debug string support. #

Total comments: 4

Patch Set 3 : Now make it compile :) #

Patch Set 4 : Only include ToString in debug builds. #

Total comments: 6

Patch Set 5 : Respond to review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M chrome/common/custom_handlers/protocol_handler.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/custom_handlers/protocol_handler.cc View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Steve McKay
Hi Ben. Can you take a look at this?
8 years, 6 months ago (2012-06-22 19:23:18 UTC) #1
benwells
lgtm with nit http://codereview.chromium.org/10559049/diff/1/chrome/common/custom_handlers/protocol_handler.cc File chrome/common/custom_handlers/protocol_handler.cc (right): http://codereview.chromium.org/10559049/diff/1/chrome/common/custom_handlers/protocol_handler.cc#newcode93 chrome/common/custom_handlers/protocol_handler.cc:93: } nit: chrome style is to ...
8 years, 6 months ago (2012-06-22 19:47:48 UTC) #2
Peter Kasting
http://codereview.chromium.org/10559049/diff/1/chrome/common/custom_handlers/protocol_handler.h File chrome/common/custom_handlers/protocol_handler.h (right): http://codereview.chromium.org/10559049/diff/1/chrome/common/custom_handlers/protocol_handler.h#newcode71 chrome/common/custom_handlers/protocol_handler.h:71: std::ostream& operator<<(std::ostream& os, const ProtocolHandler& handler); Technically to use ...
8 years, 6 months ago (2012-06-22 20:20:32 UTC) #3
smckay
PTAL. http://codereview.chromium.org/10559049/diff/1/chrome/common/custom_handlers/protocol_handler.h File chrome/common/custom_handlers/protocol_handler.h (right): http://codereview.chromium.org/10559049/diff/1/chrome/common/custom_handlers/protocol_handler.h#newcode71 chrome/common/custom_handlers/protocol_handler.h:71: std::ostream& operator<<(std::ostream& os, const ProtocolHandler& handler); On 2012/06/22 ...
8 years, 6 months ago (2012-06-22 21:57:43 UTC) #4
Peter Kasting
Q: Does the general distaste for streams then apply to things like std::stringstream? A: Yes. ...
8 years, 6 months ago (2012-06-22 22:10:06 UTC) #5
Steve McKay
PTAL. Now with COMPILES! http://codereview.chromium.org/10559049/diff/7001/chrome/common/custom_handlers/protocol_handler.cc File chrome/common/custom_handlers/protocol_handler.cc (right): http://codereview.chromium.org/10559049/diff/7001/chrome/common/custom_handlers/protocol_handler.cc#newcode74 chrome/common/custom_handlers/protocol_handler.cc:74: return std::string("{ ") + On ...
8 years, 6 months ago (2012-06-22 22:40:01 UTC) #6
Peter Kasting
LGTM; if your only use of this is for DLOG, I suggest wrapping it in ...
8 years, 6 months ago (2012-06-22 22:45:24 UTC) #7
smckay
On 2012/06/22 22:45:24, Peter Kasting wrote: > LGTM; if your only use of this is ...
8 years, 6 months ago (2012-06-22 23:25:37 UTC) #8
Peter Kasting
LGTM http://codereview.chromium.org/10559049/diff/12004/chrome/common/custom_handlers/protocol_handler.cc File chrome/common/custom_handlers/protocol_handler.cc (right): http://codereview.chromium.org/10559049/diff/12004/chrome/common/custom_handlers/protocol_handler.cc#newcode8 chrome/common/custom_handlers/protocol_handler.cc:8: #include "base/stringprintf.h" Nit: This include not needed http://codereview.chromium.org/10559049/diff/12004/chrome/common/custom_handlers/protocol_handler.cc#newcode75 ...
8 years, 6 months ago (2012-06-22 23:45:48 UTC) #9
Steve McKay
Thanks. PTAL http://codereview.chromium.org/10559049/diff/12004/chrome/common/custom_handlers/protocol_handler.cc File chrome/common/custom_handlers/protocol_handler.cc (right): http://codereview.chromium.org/10559049/diff/12004/chrome/common/custom_handlers/protocol_handler.cc#newcode8 chrome/common/custom_handlers/protocol_handler.cc:8: #include "base/stringprintf.h" On 2012/06/22 23:45:48, Peter Kasting ...
8 years, 5 months ago (2012-06-27 22:34:38 UTC) #10
Peter Kasting
LGTM
8 years, 5 months ago (2012-06-27 22:40:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/smckay@chromium.org/10559049/21001
8 years, 5 months ago (2012-06-27 23:55:49 UTC) #12
commit-bot: I haz the power
8 years, 5 months ago (2012-06-28 01:03:55 UTC) #13
Change committed as 144638

Powered by Google App Engine
This is Rietveld 408576698