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

Issue 1546623002: net: add a convenience getter accessor for dns Header to DnsQuery (Closed)

Created:
5 years ago by tfarina
Modified:
4 years, 11 months ago
Reviewers:
pauljensen
CC:
chromium-reviews, cbentzel+watch_chromium.org, eroman, szym
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

net: add a convenience getter accessor for dns Header to DnsQuery It helps to simplify the code in three places that were doing the ugly reinterpret_cast. BUG=None TEST=net_unittests --gtest_filter=DnsQuery* R=pauljensen@chromium.org Committed: https://crrev.com/0e534a8037d2816c4bc9349ee8a7c8403c66a88d Cr-Commit-Position: refs/heads/master@{#367151}

Patch Set 1 #

Total comments: 12

Patch Set 2 : replace memset #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -16 lines) Patch
M net/dns/dns_query.h View 2 chunks +7 lines, -0 lines 0 comments Download
M net/dns/dns_query.cc View 1 3 chunks +12 lines, -16 lines 0 comments Download

Messages

Total messages: 17 (2 generated)
tfarina
PTAL!
5 years ago (2015-12-22 14:24:44 UTC) #1
pauljensen
https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc File net/dns/dns_query.cc (right): https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc#newcode26 net/dns/dns_query.cc:26: memset(header(), 0, sizeof(dns_protocol::Header)); I don't like how the sizeof() ...
4 years, 11 months ago (2015-12-29 12:38:02 UTC) #2
tfarina
https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc File net/dns/dns_query.cc (right): https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc#newcode26 net/dns/dns_query.cc:26: memset(header(), 0, sizeof(dns_protocol::Header)); On 2015/12/29 12:38:02, pauljensen wrote: > ...
4 years, 11 months ago (2015-12-29 13:57:43 UTC) #3
pauljensen
https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc File net/dns/dns_query.cc (right): https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc#newcode26 net/dns/dns_query.cc:26: memset(header(), 0, sizeof(dns_protocol::Header)); On 2015/12/29 13:57:43, tfarina wrote: > ...
4 years, 11 months ago (2015-12-29 15:06:22 UTC) #4
tfarina
https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc File net/dns/dns_query.cc (right): https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc#newcode26 net/dns/dns_query.cc:26: memset(header(), 0, sizeof(dns_protocol::Header)); On 2015/12/29 15:06:22, pauljensen wrote: > ...
4 years, 11 months ago (2015-12-29 18:48:01 UTC) #5
pauljensen
https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc File net/dns/dns_query.cc (right): https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc#newcode26 net/dns/dns_query.cc:26: memset(header(), 0, sizeof(dns_protocol::Header)); On 2015/12/29 18:48:01, tfarina wrote: > ...
4 years, 11 months ago (2015-12-29 19:42:38 UTC) #6
tfarina
https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc File net/dns/dns_query.cc (right): https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc#newcode26 net/dns/dns_query.cc:26: memset(header(), 0, sizeof(dns_protocol::Header)); On 2015/12/29 19:42:37, pauljensen wrote: > ...
4 years, 11 months ago (2015-12-29 19:57:07 UTC) #7
mmenke
On 2015/12/29 19:57:07, tfarina wrote: > https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc > File net/dns/dns_query.cc (right): > > https://codereview.chromium.org/1546623002/diff/1/net/dns/dns_query.cc#newcode26 > ...
4 years, 11 months ago (2015-12-29 22:17:25 UTC) #8
szym
Agreed, and it's possible a mistake in the memset would pass all tests. On Tue, ...
4 years, 11 months ago (2015-12-29 22:34:14 UTC) #9
tfarina
PTAL!
4 years, 11 months ago (2015-12-29 22:41:53 UTC) #10
pauljensen
On 2015/12/29 22:34:14, szym wrote: > Agreed, and it's possible a mistake in the memset ...
4 years, 11 months ago (2015-12-30 03:35:21 UTC) #11
pauljensen
On 2015/12/29 22:41:53, tfarina wrote: > PTAL! lgtm. I'm glad we got rid of one ...
4 years, 11 months ago (2015-12-30 03:41:08 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1546623002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1546623002/20001
4 years, 11 months ago (2015-12-30 13:29:38 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2015-12-30 13:34:13 UTC) #15
commit-bot: I haz the power
4 years, 11 months ago (2015-12-30 13:35:22 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0e534a8037d2816c4bc9349ee8a7c8403c66a88d
Cr-Commit-Position: refs/heads/master@{#367151}

Powered by Google App Engine
This is Rietveld 408576698