|
|
Created:
4 years, 7 months ago by mpawlowski Modified:
4 years, 7 months ago CC:
chromium-reviews, cbentzel+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionnet::AddressList no longer privately inherits from std::vector
The private inheritance was not only against the style guide, it also
forbade anyone from using a standalone std::vector<net::IPEndPoint>,
since the manually defined AddressList ctor/dtor conflicted with
automatically generated ones for vector<T> instantiation.
This should be considered a first step of refactoring that class.
AddressList is neither a list, nor does it store addresses,
it's a vector of endpoints, so the name is misleading. It
should be changed.
The canonical_name_ member is only currently used in
PepperHostResolverMessageFilter, it's probably not the best idea to keep
it around in a generic class like this. Grepping AddressList reveals 500+
instances in the codeebase, and ony one use of canonical_name() outside
of unit tests. Perhaps a pair<AddressList, string> should be used for
that one particular use-case and a bare AddressList without that extra
member should be used everywhere else.
This "conservative" approach, with employing composition instead of
inheritance and delegating method calls was suggested by Nico Weber and
indeed that meant not having to change anything but the header.
Committed: https://crrev.com/74eaaac1d94b0151b70aac90e34d48c74f7d6e11
Cr-Commit-Position: refs/heads/master@{#395605}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
Messages
Total messages: 30 (15 generated)
Description was changed from ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. BUG= ========== to ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. This "conservative" approach, with employing composition instead of inheritance and delegating method calls was suggested by Nico Weber and indeed that meant not having to change anything but the header. ==========
mpawlowski@opera.com changed reviewers: + avi@chromium.org, mmenke@chromium.org, thakis@chromium.org
Description was changed from ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. This "conservative" approach, with employing composition instead of inheritance and delegating method calls was suggested by Nico Weber and indeed that meant not having to change anything but the header. ========== to ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. This "conservative" approach, with employing composition instead of inheritance and delegating method calls was suggested by Nico Weber and indeed that meant not having to change anything but the header. ==========
lgtm
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003973002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003973002/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
looks like cast needs a const overload of insert()
On 2016/05/23 14:16:04, Nico wrote: > looks like cast needs a const overload of insert() Just glancing at it, seems reasonable. Please ping me again when you get things working.
The CQ bit was checked by mpawlowski@opera.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003973002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003973002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-gn/...) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
LGTM, but you have the review covered by the owners so that's all I'll say. Thanks for doing this.
The CQ bit was checked by mpawlowski@opera.com to run a CQ dry run
The CQ bit was unchecked by mpawlowski@opera.com
The CQ bit was checked by mpawlowski@opera.com
The patchset sent to the CQ was uploaded after l-g-t-m from thakis@chromium.org, avi@chromium.org Link to the patchset: https://codereview.chromium.org/2003973002/#ps40001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003973002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003973002/40001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
LGTM (That windows failure is unrelated to this CL)
The CQ bit was checked by mpawlowski@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003973002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003973002/40001
Message was sent while issue was closed.
Description was changed from ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. This "conservative" approach, with employing composition instead of inheritance and delegating method calls was suggested by Nico Weber and indeed that meant not having to change anything but the header. ========== to ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. This "conservative" approach, with employing composition instead of inheritance and delegating method calls was suggested by Nico Weber and indeed that meant not having to change anything but the header. ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. This "conservative" approach, with employing composition instead of inheritance and delegating method calls was suggested by Nico Weber and indeed that meant not having to change anything but the header. ========== to ========== net::AddressList no longer privately inherits from std::vector The private inheritance was not only against the style guide, it also forbade anyone from using a standalone std::vector<net::IPEndPoint>, since the manually defined AddressList ctor/dtor conflicted with automatically generated ones for vector<T> instantiation. This should be considered a first step of refactoring that class. AddressList is neither a list, nor does it store addresses, it's a vector of endpoints, so the name is misleading. It should be changed. The canonical_name_ member is only currently used in PepperHostResolverMessageFilter, it's probably not the best idea to keep it around in a generic class like this. Grepping AddressList reveals 500+ instances in the codeebase, and ony one use of canonical_name() outside of unit tests. Perhaps a pair<AddressList, string> should be used for that one particular use-case and a bare AddressList without that extra member should be used everywhere else. This "conservative" approach, with employing composition instead of inheritance and delegating method calls was suggested by Nico Weber and indeed that meant not having to change anything but the header. Committed: https://crrev.com/74eaaac1d94b0151b70aac90e34d48c74f7d6e11 Cr-Commit-Position: refs/heads/master@{#395605} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/74eaaac1d94b0151b70aac90e34d48c74f7d6e11 Cr-Commit-Position: refs/heads/master@{#395605} |