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

Issue 2771673002: Use vectors instead of IOBuffer for U2fPackets (Closed)

Created:
3 years, 9 months ago by Casey Piper
Modified:
3 years, 9 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use vectors instead of IOBuffer for U2fPackets Changed to using vector class variables in U2fPacket. Now only converting to IOBuffer on the fly in U2fMessage when needed. BUG=704309 Review-Url: https://codereview.chromium.org/2771673002 Cr-Commit-Position: refs/heads/master@{#459211} Committed: https://chromium.googlesource.com/chromium/src/+/b4dde882f6c2b2be84035b53f60ec286d347bc50

Patch Set 1 : Use vectors instead of IOBuffer for U2fPackets #

Total comments: 14

Patch Set 2 : Take vectors during deserialization and output IOBuffer during serialization #

Total comments: 6

Patch Set 3 : Use memcpy instead of looping. Update fuzzer with new APIs. #

Total comments: 3

Patch Set 4 : Modify fuzzer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -165 lines) Patch
M device/u2f/u2f_hid_device.cc View 1 2 chunks +6 lines, -8 lines 0 comments Download
M device/u2f/u2f_message.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M device/u2f/u2f_message.cc View 1 2 chunks +7 lines, -9 lines 0 comments Download
M device/u2f/u2f_message_fuzzer.cc View 1 2 3 2 chunks +5 lines, -7 lines 0 comments Download
M device/u2f/u2f_message_unittest.cc View 1 7 chunks +50 lines, -46 lines 0 comments Download
M device/u2f/u2f_packet.h View 1 6 chunks +12 lines, -12 lines 0 comments Download
M device/u2f/u2f_packet.cc View 1 2 4 chunks +71 lines, -81 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 29 (18 generated)
Casey Piper
3 years, 9 months ago (2017-03-22 22:35:08 UTC) #5
Reilly Grant (use Gerrit)
Note, everywhere where I've suggested using const std::vector<uint8_t>& you could use std::vector<uint8_t> and always std::move ...
3 years, 9 months ago (2017-03-22 23:08:17 UTC) #6
Casey Piper
https://codereview.chromium.org/2771673002/diff/40001/device/u2f/u2f_message.cc File device/u2f/u2f_message.cc (right): https://codereview.chromium.org/2771673002/diff/40001/device/u2f/u2f_message.cc#newcode33 device/u2f/u2f_message.cc:33: std::vector<uint8_t> init_data(buf->data(), buf->data() + buf->size()); On 2017/03/22 23:08:16, Reilly ...
3 years, 9 months ago (2017-03-23 03:47:25 UTC) #10
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2771673002/diff/120001/device/u2f/u2f_packet.cc File device/u2f/u2f_packet.cc (right): https://codereview.chromium.org/2771673002/diff/120001/device/u2f/u2f_packet.cc#newcode54 device/u2f/u2f_packet.cc:54: serialized->data()[index++] = data_[data_idx]; std::memcpy(&serialized->data()[index], data_.data(), data_.size()); index += data_.size(); ...
3 years, 9 months ago (2017-03-23 18:15:39 UTC) #13
Casey Piper
https://codereview.chromium.org/2771673002/diff/120001/device/u2f/u2f_packet.cc File device/u2f/u2f_packet.cc (right): https://codereview.chromium.org/2771673002/diff/120001/device/u2f/u2f_packet.cc#newcode54 device/u2f/u2f_packet.cc:54: serialized->data()[index++] = data_[data_idx]; On 2017/03/23 18:15:39, Reilly Grant wrote: ...
3 years, 9 months ago (2017-03-23 18:35:51 UTC) #16
Reilly Grant (use Gerrit)
lgtm https://codereview.chromium.org/2771673002/diff/160001/device/u2f/u2f_message_fuzzer.cc File device/u2f/u2f_message_fuzzer.cc (right): https://codereview.chromium.org/2771673002/diff/160001/device/u2f/u2f_message_fuzzer.cc#newcode15 device/u2f/u2f_message_fuzzer.cc:15: uint8_t* start = const_cast<uint8_t*>(data); Looking at this now ...
3 years, 9 months ago (2017-03-23 18:39:54 UTC) #17
Casey Piper
https://codereview.chromium.org/2771673002/diff/160001/device/u2f/u2f_message_fuzzer.cc File device/u2f/u2f_message_fuzzer.cc (right): https://codereview.chromium.org/2771673002/diff/160001/device/u2f/u2f_message_fuzzer.cc#newcode15 device/u2f/u2f_message_fuzzer.cc:15: uint8_t* start = const_cast<uint8_t*>(data); On 2017/03/23 18:39:54, Reilly Grant ...
3 years, 9 months ago (2017-03-23 18:48:05 UTC) #18
Casey Piper
https://codereview.chromium.org/2771673002/diff/160001/device/u2f/u2f_message_fuzzer.cc File device/u2f/u2f_message_fuzzer.cc (right): https://codereview.chromium.org/2771673002/diff/160001/device/u2f/u2f_message_fuzzer.cc#newcode15 device/u2f/u2f_message_fuzzer.cc:15: uint8_t* start = const_cast<uint8_t*>(data); On 2017/03/23 18:48:05, Casey Piper ...
3 years, 9 months ago (2017-03-23 20:15:29 UTC) #19
Reilly Grant (use Gerrit)
still lgtm
3 years, 9 months ago (2017-03-23 20:45:27 UTC) #24
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/2771673002/180001
3 years, 9 months ago (2017-03-23 20:46:30 UTC) #26
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 20:52:05 UTC) #29
Message was sent while issue was closed.
Committed patchset #4 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/b4dde882f6c2b2be84035b53f60e...

Powered by Google App Engine
This is Rietveld 408576698