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

Issue 1408803010: Add IPAddress class as a replacement for the IPAddressNumber typedef. (Closed)

Created:
5 years, 1 month ago by martijnc
Modified:
5 years ago
Reviewers:
eroman
CC:
cbentzel+watch_chromium.org, chromium-reviews, mmenke
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This CL adds an IPAddress class intended to replace the current IPAddressNumber typedef. The class wraps a std::vector<uint8_t> containing the actual IP address and exposes a couple of helper methods. This CL only introduces the new class and related tests. BUG=496258 Committed: https://crrev.com/04e01ee14b56c54d2fa59ee0b5c35e727669461b Cr-Commit-Position: refs/heads/master@{#363046}

Patch Set 1 : Rename to IPAddress #

Patch Set 2 : #

Total comments: 18

Patch Set 3 : Comments eroman #

Total comments: 23

Patch Set 4 : Comments eroman #

Total comments: 12

Patch Set 5 : Remove duplicated implementations #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -0 lines) Patch
A net/base/ip_address.h View 1 2 3 1 chunk +71 lines, -0 lines 1 comment Download
A net/base/ip_address.cc View 1 2 3 4 1 chunk +67 lines, -0 lines 0 comments Download
M net/base/ip_address_number.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A net/base/ip_address_unittest.cc View 1 2 3 1 chunk +134 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (15 generated)
martijnc
Hi, I created an IPAddress class as a possible replacement for IPAddressNumber. Can you take ...
5 years ago (2015-11-23 22:09:25 UTC) #9
eroman
Thanks for working on this! Some general design comments before going into too much detail ...
5 years ago (2015-11-24 00:21:49 UTC) #10
martijnc
Thank you for the review and design comments! I've uploaded a new patch that addresses ...
5 years ago (2015-11-26 22:10:31 UTC) #14
eroman
The design looks good! Please also add a TODO comment in ip_address_number.h that new code ...
5 years ago (2015-11-30 22:12:33 UTC) #15
eroman
https://codereview.chromium.org/1408803010/diff/160001/net/base/ip_address.h File net/base/ip_address.h (right): https://codereview.chromium.org/1408803010/diff/160001/net/base/ip_address.h#newcode24 net/base/ip_address.h:24: IPAddress(const uint8_t* address, size_t address_len); On 2015/11/30 22:12:33, eroman ...
5 years ago (2015-11-30 22:15:23 UTC) #16
martijnc
Thank you for the review! I've uploaded a new patch. > Please also add a ...
5 years ago (2015-12-01 22:09:13 UTC) #19
martijnc
https://codereview.chromium.org/1408803010/diff/160001/net/base/ip_address.cc File net/base/ip_address.cc (right): https://codereview.chromium.org/1408803010/diff/160001/net/base/ip_address.cc#newcode66 net/base/ip_address.cc:66: size_t address_len = ip_address_.size(); On 2015/11/30 at 22:12:33, eroman ...
5 years ago (2015-12-01 22:09:34 UTC) #20
eroman
https://codereview.chromium.org/1408803010/diff/220001/net/base/ip_address.cc File net/base/ip_address.cc (right): https://codereview.chromium.org/1408803010/diff/220001/net/base/ip_address.cc#newcode14 net/base/ip_address.cc:14: const unsigned char kIPv4MappedPrefix[] = {0, 0, 0, 0, ...
5 years ago (2015-12-01 23:00:40 UTC) #21
martijnc
Thank you for the review. I've removed the duplicated code (left the tests in, is ...
5 years ago (2015-12-02 21:28:07 UTC) #22
eroman
lgtm
5 years ago (2015-12-02 22:03:52 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408803010/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408803010/240001
5 years ago (2015-12-03 18:48:40 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:240001)
5 years ago (2015-12-03 20:37:09 UTC) #26
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/04e01ee14b56c54d2fa59ee0b5c35e727669461b Cr-Commit-Position: refs/heads/master@{#363046}
5 years ago (2015-12-03 20:37:59 UTC) #28
tfarina
5 years ago (2015-12-12 01:21:15 UTC) #29
Message was sent while issue was closed.
https://codereview.chromium.org/1408803010/diff/240001/net/base/ip_address.h
File net/base/ip_address.h (right):

https://codereview.chromium.org/1408803010/diff/240001/net/base/ip_address.h#...
net/base/ip_address.h:10: #include "base/basictypes.h"
hum, we should include <stdint.h> instead now.

Powered by Google App Engine
This is Rietveld 408576698