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

Issue 2353663003: Add base::UnguessableToken << operator (Closed)

Created:
4 years, 3 months ago by tguilbert
Modified:
4 years, 3 months ago
Reviewers:
danakj
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add base::UnguessableToken << operator base::UnguessableToken seems to fit the Google C++ style guide's criterion on overloading << as a streaming operator. Notably: -- It represents a value. -- There is an easy human-readable string reprensetation of the value (0 padded HEX). This change adds an overload to the << operator, as syntactic sugar. BUG=648441 TEST= Modified a UT to test the operator. Committed: https://crrev.com/13be8a310b844140227c0c9f1f54991478bef8d2 Cr-Commit-Position: refs/heads/master@{#419647}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Moved defn to .cc file. #

Total comments: 2

Patch Set 3 : Addressed comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M base/unguessable_token.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M base/unguessable_token.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M base/unguessable_token_unittest.cc View 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
tguilbert
PTAL! (I promise this should simpler than the previous UnguessableToken reviews :P) Thanks, Thomas
4 years, 3 months ago (2016-09-19 23:10:39 UTC) #3
danakj
https://codereview.chromium.org/2353663003/diff/1/base/unguessable_token.h File base/unguessable_token.h (right): https://codereview.chromium.org/2353663003/diff/1/base/unguessable_token.h#newcode100 base/unguessable_token.h:100: return out << token.ToString(); Can you put the defn ...
4 years, 3 months ago (2016-09-19 23:41:06 UTC) #4
tguilbert
https://codereview.chromium.org/2353663003/diff/1/base/unguessable_token.h File base/unguessable_token.h (right): https://codereview.chromium.org/2353663003/diff/1/base/unguessable_token.h#newcode100 base/unguessable_token.h:100: return out << token.ToString(); On 2016/09/19 23:41:05, danakj wrote: ...
4 years, 3 months ago (2016-09-20 00:04:53 UTC) #5
danakj
LGTM https://codereview.chromium.org/2353663003/diff/20001/base/unguessable_token.h File base/unguessable_token.h (right): https://codereview.chromium.org/2353663003/diff/20001/base/unguessable_token.h#newcode98 base/unguessable_token.h:98: BASE_EXPORT std::ostream& operator<<(std::ostream& out, nit: order this beside ...
4 years, 3 months ago (2016-09-20 00:07:08 UTC) #6
tguilbert
Thank you! https://codereview.chromium.org/2353663003/diff/20001/base/unguessable_token.h File base/unguessable_token.h (right): https://codereview.chromium.org/2353663003/diff/20001/base/unguessable_token.h#newcode98 base/unguessable_token.h:98: BASE_EXPORT std::ostream& operator<<(std::ostream& out, On 2016/09/20 00:07:08, ...
4 years, 3 months ago (2016-09-20 00:50:34 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2353663003/40001
4 years, 3 months ago (2016-09-20 00:51:10 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-20 02:05:09 UTC) #12
commit-bot: I haz the power
4 years, 3 months ago (2016-09-20 02:06:52 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/13be8a310b844140227c0c9f1f54991478bef8d2
Cr-Commit-Position: refs/heads/master@{#419647}

Powered by Google App Engine
This is Rietveld 408576698