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

Issue 2901923002: Reduce string building complexity when needing to add a NUL byte (Closed)

Created:
3 years, 7 months ago by Peter Beverloo
Modified:
3 years, 7 months ago
Reviewers:
eroman
CC:
chromium-reviews, Peter Beverloo, johnme+watch_chromium.org, zea+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Reduce string building complexity when needing to add a NUL byte sizeof() enables us to copy over the NUL terminator included with the string constant as well, so indicate the size explicitly. BUG=679789 Review-Url: https://codereview.chromium.org/2901923002 Cr-Commit-Position: refs/heads/master@{#474247} Committed: https://chromium.googlesource.com/chromium/src/+/01f5fe9f3bf0c8574a78037f7ac07d8bc2dceffc

Patch Set 1 : Reduce string building complexity when needing to add a NUL byte #

Total comments: 2

Patch Set 2 : Reduce string building complexity when needing to add a NUL byte #

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -7 lines) Patch
M components/gcm_driver/crypto/gcm_message_cryptographer.cc View 1 2 chunks +6 lines, -7 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
Peter Beverloo
+eroman
3 years, 7 months ago (2017-05-23 18:15:12 UTC) #3
eroman
lgtm https://codereview.chromium.org/2901923002/diff/20001/components/gcm_driver/crypto/gcm_message_cryptographer.cc File components/gcm_driver/crypto/gcm_message_cryptographer.cc (right): https://codereview.chromium.org/2901923002/diff/20001/components/gcm_driver/crypto/gcm_message_cryptographer.cc#newcode61 components/gcm_driver/crypto/gcm_message_cryptographer.cc:61: std::string info(kInfo, sizeof(kInfo)); How about using a StringPiece ...
3 years, 7 months ago (2017-05-23 18:20:08 UTC) #4
Peter Beverloo
https://codereview.chromium.org/2901923002/diff/20001/components/gcm_driver/crypto/gcm_message_cryptographer.cc File components/gcm_driver/crypto/gcm_message_cryptographer.cc (right): https://codereview.chromium.org/2901923002/diff/20001/components/gcm_driver/crypto/gcm_message_cryptographer.cc#newcode61 components/gcm_driver/crypto/gcm_message_cryptographer.cc:61: std::string info(kInfo, sizeof(kInfo)); On 2017/05/23 18:20:08, eroman wrote: > ...
3 years, 7 months ago (2017-05-23 19:01:21 UTC) #5
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/2901923002/40001
3 years, 7 months ago (2017-05-23 19:02:25 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/274244) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 7 months ago (2017-05-23 19:11:43 UTC) #10
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/2901923002/60001
3 years, 7 months ago (2017-05-24 09:59:12 UTC) #13
commit-bot: I haz the power
3 years, 7 months ago (2017-05-24 10:56:31 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/01f5fe9f3bf0c8574a78037f7ac0...

Powered by Google App Engine
This is Rietveld 408576698