Use initializer_list and string_view in DohProviderEntry. [chromium/src : main]

0 views
Skip to first unread message

Prashant Nevase (Gerrit)

unread,
Nov 15, 2024, 5:02:59 AM11/15/24
to Mayur Patil, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
Attention needed from Adam Rice, John Lee, Mayur Patil, mmenke and suresh potti

Prashant Nevase voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • John Lee
  • Mayur Patil
  • mmenke
  • suresh potti
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
Gerrit-Change-Number: 6017776
Gerrit-PatchSet: 11
Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: John Lee <john...@chromium.org>
Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
Gerrit-Reviewer: mmenke <mme...@chromium.org>
Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
Gerrit-Attention: John Lee <john...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
Gerrit-Attention: mmenke <mme...@chromium.org>
Gerrit-Attention: suresh potti <sures...@microsoft.com>
Gerrit-Comment-Date: Fri, 15 Nov 2024 10:02:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Rice (Gerrit)

unread,
Nov 15, 2024, 6:28:54 AM11/15/24
to Prashant Nevase, Mayur Patil, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
Attention needed from John Lee, Mayur Patil, Prashant Nevase, mmenke and suresh potti

Adam Rice added 5 comments

Patchset-level comments
File-level comment, Patchset 11 (Latest):
Adam Rice . resolved

Thanks for the change.

One other thing:

DohProviderEntry::GetList() does a lot of calls to `new`, which is inefficient and bad practice.

Instead, could you change it to
```
static const base::NoDestructor<DohProviderEntry> array[] = {
{
"AlekBergNl",
MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
/*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
"https://dnsnl.alekberg.net/dns-query{?dns}",
/*ui_name=*/"alekberg.net (NL)",
/*privacy_policy=*/"https://alekberg.net/privacy",
/*display_globally=*/false,
/*display_countries=*/{"NL"}, LoggingLevel::kNormal
},
< rest of the entries >
};
static const base::NoDestructor<DohProviderEntry::List> providers =
base::ToVector(array,
[](const DohProviderEntry& entry) {
return raw_ptr<const DohProviderEntry, VectorExperimental>(&entry);
});
```

Ultimately I'd like to make `array` constexpr and eliminate most of the startup overhead completely, but make `ParseValidDohTemplate()` work on a `constexpr` context will be quite difficult and is out-of-scope for this CL.

File net/dns/public/doh_provider_entry.h
Line 94, Patchset 11 (Latest): std::string provider,
Adam Rice . unresolved

It's weird that this is a std::string. This can also be a `std::string_view`, as can the member variable and the parameter to ConstructForTesting().

Line 81, Patchset 11 (Latest): std::set<std::string> display_countries,
Adam Rice . unresolved

`display_countries` can also be `base::flat_set<std::string_view>`.

Line 59, Patchset 11 (Latest): std::initializer_list<std::string_view> dns_over_tls_hostnames;
Adam Rice . unresolved

This should stay as a set, since it is used for lookups at runtime. However, this and the other std::sets should be base::flat_set instead because it is more space-efficient.

Line 39, Patchset 11 (Latest):// Use DohProviderEntry in such a way that the lifetime of its members is
Adam Rice . unresolved

I don't think we need this comment here, because production code can't construct a DohProviderEntry. Instead, comment that DohProviderEntries are only constructed with static data in production.

Then add a comment to ConstructForTesting() that the caller has to ensure that the parameters are static or outlive the object.

Open in Gerrit

Related details

Attention is currently required from:
  • John Lee
  • Mayur Patil
  • Prashant Nevase
  • mmenke
  • suresh potti
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 11
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: mmenke <mme...@chromium.org>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
    Gerrit-Attention: mmenke <mme...@chromium.org>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Fri, 15 Nov 2024 11:28:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 15, 2024, 7:21:50 AM11/15/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Prashant Nevase, mmenke and suresh potti

    Mayur Patil added 1 comment

    File net/dns/public/doh_provider_entry.h
    Line 94, Patchset 11 (Latest): std::string provider,
    Adam Rice . unresolved

    It's weird that this is a std::string. This can also be a `std::string_view`, as can the member variable and the parameter to ConstructForTesting().

    Mayur Patil
    If this is about std::string provider, cannot mark it as string_view because, it is a member variable for this struct. As well if you checked its usage of  GetDohProviderIdForHistogramFromNameserver at

    https://source.chromium.org/chromium/chromium/src/+/main:net/dns/dns_util.cc;drc=60130be50f68c89220d8ace62c87155025267a2c;bpv=1;bpt=1;l=192?q=doh&ss=chromium

    it could cause dangling pointer error.
    There might be need to mark "Other" string as static const to make it possible. But still need to recheck thorougly

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: mmenke <mme...@chromium.org>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Fri, 15 Nov 2024 12:21:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 15, 2024, 9:10:40 AM11/15/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Prashant Nevase, mmenke and suresh potti

    Mayur Patil added 2 comments

    File net/dns/public/doh_provider_entry.h
    Line 59, Patchset 11: std::initializer_list<std::string_view> dns_over_tls_hostnames;
    Adam Rice . resolved

    This should stay as a set, since it is used for lookups at runtime. However, this and the other std::sets should be base::flat_set instead because it is more space-efficient.

    Mayur Patil

    Acknowledged

    Line 39, Patchset 11:// Use DohProviderEntry in such a way that the lifetime of its members is
    Adam Rice . resolved

    I don't think we need this comment here, because production code can't construct a DohProviderEntry. Instead, comment that DohProviderEntries are only constructed with static data in production.

    Then add a comment to ConstructForTesting() that the caller has to ensure that the parameters are static or outlive the object.

    Mayur Patil

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    • Prashant Nevase
    • mmenke
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 12
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: mmenke <mme...@chromium.org>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: mmenke <mme...@chromium.org>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Fri, 15 Nov 2024 14:10:17 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    mmenke (Gerrit)

    unread,
    Nov 15, 2024, 10:41:59 AM11/15/24
    to Mayur Patil, Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Mayur Patil, Prashant Nevase and suresh potti

    mmenke added 5 comments

    Patchset-level comments
    File-level comment, Patchset 12 (Latest):
    mmenke . resolved

    Removing myself as a reviewer - I don't think this CL needs 5 reviewers. Deferring to Adam.

    File net/dns/public/doh_provider_entry.h
    Line 39, Patchset 12 (Latest):// the dropdown menu.
    // DohProviderEntries are only constructed with static data in production.
    mmenke . unresolved

    I think you need to explain what that means, both here and in the constructor. Namely, they must be constructed with strings with static storage duration, that are never destroyed.

    File net/dns/public/doh_provider_entry.cc
    Line 329, Patchset 12 (Latest): std::move(ui_name), std::move(privacy_policy), display_globally,
    mmenke . unresolved

    std::move is generally not called on string_views, since it's just as fast to copy them.

    Line 349, Patchset 12 (Latest): ip_addresses(ParseIPs(dns_over_53_server_ip_strs)),
    dns_over_tls_hostnames(std::move(dns_over_tls_hostnames)),
    mmenke . unresolved

    std::move() doesn't do anything here, either, does it? Not that familiar with initializer lists.

    Line 354, Patchset 12 (Latest): ui_name(std::move(ui_name)),
    privacy_policy(std::move(privacy_policy)),
    mmenke . unresolved

    std::move() here doesn't do anything, since we're constructing a string.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    • Mayur Patil
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 12
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: mmenke <mme...@chromium.org>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Fri, 15 Nov 2024 15:41:49 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Adam Rice (Gerrit)

    unread,
    Nov 18, 2024, 5:54:47 AM11/18/24
    to Mayur Patil, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from John Lee, Mayur Patil, Prashant Nevase and suresh potti

    Adam Rice added 3 comments

    File net/dns/public/doh_provider_entry.h
    Line 94, Patchset 11: std::string provider,
    Adam Rice . unresolved

    It's weird that this is a std::string. This can also be a `std::string_view`, as can the member variable and the parameter to ConstructForTesting().

    Mayur Patil
    If this is about std::string provider, cannot mark it as string_view because, it is a member variable for this struct. As well if you checked its usage of  GetDohProviderIdForHistogramFromNameserver at

    https://source.chromium.org/chromium/chromium/src/+/main:net/dns/dns_util.cc;drc=60130be50f68c89220d8ace62c87155025267a2c;bpv=1;bpt=1;l=192?q=doh&ss=chromium

    it could cause dangling pointer error.
    There might be need to mark "Other" string as static const to make it possible. But still need to recheck thorougly

    Adam Rice

    Actually, it's fine for GetDohProviderIdForHistogramFromNameserver() to return std::string even if `entries[0]->provider` is a std::string_view as it could be written as
    ```
    return entries.empty() ? "Other" : std::string(entries[0]->provider);
    ```

    However, I think a better solution is to make that function return `std::string_view`. It's perfectly safe to convert an ordinary string literal to a `std::string_view` as it will be stored in the read-only static data part of the binary, so there's no risk of a dangling pointer.

    So, yes, I think the member variable should change type to `std::string_view`.

    File net/dns/public/doh_provider_entry.cc
    Line 329, Patchset 12: std::move(ui_name), std::move(privacy_policy), display_globally,
    mmenke . unresolved

    std::move is generally not called on string_views, since it's just as fast to copy them.

    Adam Rice

    Yes. It's better not to use std::move where it does nothing, as it slows down the reader as they wonder why it is there.

    Line 349, Patchset 12: ip_addresses(ParseIPs(dns_over_53_server_ip_strs)),
    dns_over_tls_hostnames(std::move(dns_over_tls_hostnames)),
    mmenke . unresolved

    std::move() doesn't do anything here, either, does it? Not that familiar with initializer lists.

    Adam Rice

    `dns_over_tls_hostnames` is a `base::flat_set` passed by value in the newest patch set, so std::move is correct here. You were right that it didn't make sense when it was an `initializer_list`, as `std::initializer_list<std::string_view>` is internally similar to `std::span<const std::string_view>`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • John Lee
    • Mayur Patil
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 13
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Mon, 18 Nov 2024 10:54:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
    Comment-In-Reply-To: Mayur Patil <patil...@microsoft.com>
    Comment-In-Reply-To: mmenke <mme...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 18, 2024, 7:59:59 AM11/18/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Prashant Nevase and suresh potti

    Mayur Patil added 6 comments

    Patchset-level comments
    File-level comment, Patchset 11:
    Adam Rice . unresolved

    Thanks for the change.

    One other thing:

    DohProviderEntry::GetList() does a lot of calls to `new`, which is inefficient and bad practice.

    Instead, could you change it to
    ```
    static const base::NoDestructor<DohProviderEntry> array[] = {
    {
    "AlekBergNl",
    MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    "https://dnsnl.alekberg.net/dns-query{?dns}",
    /*ui_name=*/"alekberg.net (NL)",
    /*privacy_policy=*/"https://alekberg.net/privacy",
    /*display_globally=*/false,
    /*display_countries=*/{"NL"}, LoggingLevel::kNormal
    },
    < rest of the entries >
    };
    static const base::NoDestructor<DohProviderEntry::List> providers =
    base::ToVector(array,
    [](const DohProviderEntry& entry) {
    return raw_ptr<const DohProviderEntry, VectorExperimental>(&entry);
    });
    ```

    Ultimately I'd like to make `array` constexpr and eliminate most of the startup overhead completely, but make `ParseValidDohTemplate()` work on a `constexpr` context will be quite difficult and is out-of-scope for this CL.

    Mayur Patil

    I tried above suggestions but I keep getting errors. could you suggest any work arounds for this problem or we can take it separately in other PR.... (Also Enable move and copy constructors)


    Error log:

    ../../net/dns/public/doh_provider_entry.cc(71,61): error: no matching constructor for initialization of 'const base::NoDestructor<DohProviderEntry>'
    71 | static const base::NoDestructor<DohProviderEntry> a2[] = {{
    | ^
    72 | "AlekBergNl",
    | ~~~~~~~~~~~~~
    73 | MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    74 | DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    75 | /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    76 | "https://dnsnl.alekberg.net/dns-query{?dns}",
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    77 | /*ui_name=*/"alekberg.net (NL)",
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    78 | /*privacy_policy=*/"https://alekberg.net/privacy",
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    79 | /*display_globally=*/false,
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    80 | /*display_countries=*/{"NL"}, LoggingLevel::kNormal},
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../..\base/no_destructor.h(98,12): note: candidate template ignored: substitution failure: deduced incomplete pack <const char (&)[11], const base::Feature *, (no value), (no value), const char (&)[43], const char (&)[18], const char (&)[29], _Bool, (no value), net::DohProviderEntry::LoggingLevel> for template parameter 'Args'
    97 | template <typename... Args>
    | ~~~~
    98 | explicit NoDestructor(Args&&... args) {
    | ^
    ../..\base/no_destructor.h(104,12): note: candidate constructor not viable: requires single argument 'x', but 10 arguments were provided
    104 | explicit NoDestructor(const T& x) { new (storage_) T(x); }
    | ^ ~~~~~~~~~~
    ../..\base/no_destructor.h(105,12): note: candidate constructor not viable: requires single argument 'x', but 10 arguments were provided
    105 | explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); }
    | ^ ~~~~~
    ../..\base/no_destructor.h(107,3): note: candidate constructor not viable: requires 1 argument, but 10 were provided
    107 | NoDestructor(const NoDestructor&) = delete;
    | ^ ~~~~~~~~~~~~~~~~~~~
    ../../net/dns/public/doh_provider_entry.cc(81,11): error: no matching constructor for initialization of 'const base::NoDestructor<DohProviderEntry>'
    81 | {
    | ^
    82 | "AlekBergN2",
    | ~~~~~~~~~~~~~
    83 | MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    84 | DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    85 | /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    86 | "https://dnsnl.alekberg.net/dns-query{?dns}",
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    87 | /*ui_name=*/"alekberg.net (NL)",
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    88 | /*privacy_policy=*/"https://alekberg.net/privacy",
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    89 | /*display_globally=*/false,
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    90 | /*display_countries=*/{"NL"}, LoggingLevel::kNormal}};
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../..\base/no_destructor.h(98,12): note: candidate template ignored: substitution failure: deduced incomplete pack <const char (&)[11], const base::Feature *, (no value), (no value), const char (&)[43], const char (&)[18], const char (&)[29], _Bool, (no value), net::DohProviderEntry::LoggingLevel> for template parameter 'Args'
    97 | template <typename... Args>
    | ~~~~
    98 | explicit NoDestructor(Args&&... args) {
    | ^
    ../..\base/no_destructor.h(104,12): note: candidate constructor not viable: requires single argument 'x', but 10 arguments were provided
    104 | explicit NoDestructor(const T& x) { new (storage_) T(x); }
    | ^ ~~~~~~~~~~
    ../..\base/no_destructor.h(105,12): note: candidate constructor not viable: requires single argument 'x', but 10 arguments were provided
    105 | explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); }
    | ^ ~~~~~
    ../..\base/no_destructor.h(107,3): note: candidate constructor not viable: requires 1 argument, but 10 were provided
    107 | NoDestructor(const NoDestructor&) = delete;


    ----------------------------------------------------------------------------


    I was able to build normal array of objects, with copy constructor and move constructors which where originally deleted by making them default.

      DohProviderEntry::DohProviderEntry(DohProviderEntry& other) = default;
    DohProviderEntry::DohProviderEntry(DohProviderEntry&& other) = default;
     const DohProviderEntry arr[] = {{

    "AlekBergNl",
    MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    "https://dnsnl.alekberg.net/dns-query{?dns}",
    /*ui_name=*/"alekberg.net (NL)",
    /*privacy_policy=*/"https://alekberg.net/privacy",
    /*display_globally=*/false,
    /*display_countries=*/{"NL"}, LoggingLevel::kNormal},
              {
    "AlekBergN2",

    MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    "https://dnsnl.alekberg.net/dns-query{?dns}",
    /*ui_name=*/"alekberg.net (NL)",
    /*privacy_policy=*/"https://alekberg.net/privacy",
    /*display_globally=*/false,
              /*display_countries=*/{"NL"}, LoggingLevel::kNormal}};


    for static array it failed because of non trivial constructor, which can be fixed by defining it explicitly

    File net/dns/public/doh_provider_entry.h
    Line 94, Patchset 11: std::string provider,
    Adam Rice . resolved

    It's weird that this is a std::string. This can also be a `std::string_view`, as can the member variable and the parameter to ConstructForTesting().

    Mayur Patil
    If this is about std::string provider, cannot mark it as string_view because, it is a member variable for this struct. As well if you checked its usage of  GetDohProviderIdForHistogramFromNameserver at

    https://source.chromium.org/chromium/chromium/src/+/main:net/dns/dns_util.cc;drc=60130be50f68c89220d8ace62c87155025267a2c;bpv=1;bpt=1;l=192?q=doh&ss=chromium

    it could cause dangling pointer error.
    There might be need to mark "Other" string as static const to make it possible. But still need to recheck thorougly

    Adam Rice

    Actually, it's fine for GetDohProviderIdForHistogramFromNameserver() to return std::string even if `entries[0]->provider` is a std::string_view as it could be written as
    ```
    return entries.empty() ? "Other" : std::string(entries[0]->provider);
    ```

    However, I think a better solution is to make that function return `std::string_view`. It's perfectly safe to convert an ordinary string literal to a `std::string_view` as it will be stored in the read-only static data part of the binary, so there's no risk of a dangling pointer.

    So, yes, I think the member variable should change type to `std::string_view`.

    Mayur Patil

    Acknowledged

    Line 81, Patchset 11: std::set<std::string> display_countries,
    Adam Rice . resolved

    `display_countries` can also be `base::flat_set<std::string_view>`.

    Mayur Patil

    Acknowledged

    File net/dns/public/doh_provider_entry.cc
    Line 329, Patchset 12: std::move(ui_name), std::move(privacy_policy), display_globally,
    mmenke . resolved

    std::move is generally not called on string_views, since it's just as fast to copy them.

    Adam Rice

    Yes. It's better not to use std::move where it does nothing, as it slows down the reader as they wonder why it is there.

    Mayur Patil

    Acknowledged

    Line 349, Patchset 12: ip_addresses(ParseIPs(dns_over_53_server_ip_strs)),
    dns_over_tls_hostnames(std::move(dns_over_tls_hostnames)),
    mmenke . resolved

    std::move() doesn't do anything here, either, does it? Not that familiar with initializer lists.

    Adam Rice

    `dns_over_tls_hostnames` is a `base::flat_set` passed by value in the newest patch set, so std::move is correct here. You were right that it didn't make sense when it was an `initializer_list`, as `std::initializer_list<std::string_view>` is internally similar to `std::span<const std::string_view>`.

    Mayur Patil

    Acknowledged

    Line 354, Patchset 12: ui_name(std::move(ui_name)),
    privacy_policy(std::move(privacy_policy)),
    mmenke . resolved

    std::move() here doesn't do anything, since we're constructing a string.

    Mayur Patil

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 14
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Mon, 18 Nov 2024 12:59:47 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 18, 2024, 8:00:20 AM11/18/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Prashant Nevase and suresh potti

    Mayur Patil added 1 comment

    File net/dns/public/doh_provider_entry.h
    Line 39, Patchset 12:// the dropdown menu.

    // DohProviderEntries are only constructed with static data in production.
    mmenke . resolved

    I think you need to explain what that means, both here and in the constructor. Namely, they must be constructed with strings with static storage duration, that are never destroyed.

    Mayur Patil

    Acknowledged

    Gerrit-Comment-Date: Mon, 18 Nov 2024 13:00:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: mmenke <mme...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Adam Rice (Gerrit)

    unread,
    Nov 19, 2024, 7:45:44 AM11/19/24
    to Mayur Patil, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from John Lee, Mayur Patil, Prashant Nevase and suresh potti

    Adam Rice added 1 comment

    Patchset-level comments
    Adam Rice
    Sorry about that. I forgot that using base::NoDestructor would prevent type inference for the array. There are a number of ways around this, but probably the least-worst is to make explicit calls to the `DohProviderEntry` constructor, like this:

    ```
    static const base::NoDestructor<DohProviderEntry> array[] = {
      DohProviderEntry("AlekBergNl",

    MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    "https://dnsnl.alekberg.net/dns-query{?dns}",
    /*ui_name=*/"alekberg.net (NL)",
    /*privacy_policy=*/"https://alekberg.net/privacy",
    /*display_globally=*/false,
              /*display_countries=*/{"NL"}, LoggingLevel::kNormal),
    DohProviderEntry("the next one", ...),
    < rest of the entries >
    };
    ```
    You will need the move constructor for DohProviderEntry to be available in order for this to compile. I think the copy constructor is unnecessary.

    Since this is the only code outside of tests that creates DohProviderEntry objects, and they are always const, no other code will be able to call the move constructor anyway, so it should be harmless.

    I also made a mistake with the lambda that is used in base::ToVector. It should have been
    ```

    static const base::NoDestructor<DohProviderEntry::List> providers =
    base::ToVector(array,
          [](const base::NoDestructor<DohProviderEntry>& entry) {
    return raw_ptr<const DohProviderEntry, VectorExperimental>(entry.get());
    });
    ```

    Sorry I wasted your time with my errors.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • John Lee
    • Mayur Patil
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 14
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Tue, 19 Nov 2024 12:45:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 20, 2024, 8:37:36 AM11/20/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Prashant Nevase and suresh potti

    Mayur Patil added 1 comment

    Patchset-level comments
    Mayur Patil

    Creation of DohProviderEntry objects for was not working the way it is mentioned.
    I had to create base::NoDestructor<DohProviderEntry>(...) objects array.

      static const base::NoDestructor<DohProviderEntry> array[] = {
            base::NoDestructor<DohProviderEntry>("AlekBergNl",

    MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    "https://dnsnl.alekberg.net/dns-query{?dns}",
    /*ui_name=*/"alekberg.net (NL)",
              ....)
    <ENTRIES>
    }

    Also base::Vector conversions mentioned fails giving error as

    no viable conversion from 'std::vector<ProjectedType>' (aka 'vector<base::raw_ptr<const net::DohProviderEntry, partition_alloc::internal::RawPtrTraits::kMayDangle>>') to 'const base::NoDestructor<DohProviderEntry::List>' (aka 'const NoDestructor<vector<raw_ptr<const DohProviderEntry, VectorExperimental>>>')

    so I had to first create temp vector and then cast it to base::NoDestructor<T>
    instance...

      static const base::NoDestructor<DohProviderEntry::List> providers = []() {
    const DohProviderEntry::List temp_vector = base::ToVector(
    array, [](const base::NoDestructor<DohProviderEntry>& entry) {

    return raw_ptr<const DohProviderEntry, VectorExperimental>(
    entry.get());
    });
        return base::NoDestructor<DohProviderEntry::List>(temp_vector);
    }();


    There is one more easy to read solution but I did not find any usage or references in chromium source code directly. It is used in few third party libraries

    The only implications of these macros will be that it is tied to clang compiler

      [[clang::always_destroy]] static const DohProviderEntry array[] = {{

    "AlekBergNl",
    MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
    /*dns_over_53_server_ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
    "https://dnsnl.alekberg.net/dns-query{?dns}",
    /*ui_name=*/"alekberg.net (NL)",
    /*privacy_policy=*/"https://alekberg.net/privacy",
    /*display_globally=*/false,
    /*display_countries=*/{"NL"}, LoggingLevel::kNormal},
          {
    "CleanBrowsingAdult",
    MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
    DohProviderCleanBrowsingAdult, base::FEATURE_ENABLED_BY_DEFAULT),
    {"185.228.168.10", "185.228.169.11", "2a0d:2a00:1::1",
    "2a0d:2a00:2::1"},
    /*dns_over_tls_hostnames=*/{"adult-filter-dns.cleanbrowsing.org"},
    "https://doh.cleanbrowsing.org/doh/adult-filter{?dns}",
    /*ui_name=*/"", /*privacy_policy=*/"",
    /*display_globally=*/false, /*display_countries=*/{},
    LoggingLevel::kNormal
    }}
    static const base::NoDestructor<DohProviderEntry::List> providers
     (base::ToVector(array, [](const DohProviderEntry& entry) {  

    return raw_ptr<const DohProviderEntry, VectorExperimental>(&entry);
    }));

    If objects are not required to be destroyed even after process completes in that case [[clang::no_destroy]] can be used.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 15
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Wed, 20 Nov 2024 13:37:23 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 20, 2024, 9:00:52 AM11/20/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Patchset-level comments
    Mayur Patil

    seems NoDestructor<DohProviderEntry> is getting destroyed on run.

    Gerrit-Comment-Date: Wed, 20 Nov 2024 14:00:36 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 20, 2024, 1:43:24 PM11/20/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Patchset-level comments
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 16
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Wed, 20 Nov 2024 18:43:14 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Adam Rice (Gerrit)

    unread,
    Nov 22, 2024, 3:30:45 AM11/22/24
    to Mayur Patil, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from John Lee, Mayur Patil, Prashant Nevase and suresh potti

    Adam Rice added 1 comment

    Patchset-level comments
    Adam Rice

    Sorry, about that. I found an answer, but it was really hard to get working: https://godbolt.org/z/rPMhYGbaP.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • John Lee
    • Mayur Patil
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 16
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Fri, 22 Nov 2024 08:30:33 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 22, 2024, 5:14:29 AM11/22/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Prashant Nevase and suresh potti

    Mayur Patil added 1 comment

    Patchset-level comments
    Mayur Patil

    Thanks for your help. I will use above solution

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 17
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Fri, 22 Nov 2024 10:14:18 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mayur Patil (Gerrit)

    unread,
    Nov 22, 2024, 12:05:13 PM11/22/24
    to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Adam Rice, John Lee, Prashant Nevase and suresh potti

    Mayur Patil added 1 comment

    Patchset-level comments
    Mayur Patil

    It worked and associated issues are resolved

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • John Lee
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
    Gerrit-Change-Number: 6017776
    Gerrit-PatchSet: 18
    Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: John Lee <john...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
    Gerrit-Attention: John Lee <john...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
    Gerrit-Attention: suresh potti <sures...@microsoft.com>
    Gerrit-Comment-Date: Fri, 22 Nov 2024 17:05:02 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Adam Rice (Gerrit)

    unread,
    Nov 25, 2024, 5:14:16 AM11/25/24
    to Mayur Patil, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from John Lee, Mayur Patil, Prashant Nevase and suresh potti

    Adam Rice voted and added 4 comments

    Votes added by Adam Rice

    Code-Review+1

    4 comments

    Patchset-level comments
    File-level comment, Patchset 18 (Latest):
    Adam Rice . resolved

    lgtm with nits.

    File net/dns/public/doh_provider_entry.cc
    Line 346, Patchset 18 (Latest): std::move(provider), feature, std::move(dns_over_53_server_ip_strs),
    Adam Rice . unresolved

    std::move() should not be used with `provider`, `dns_over_53_server_ip_strs`, `ui_name`, and `privacy_policy` as `string_view` and `initializer_list` objects are not usefully movable because they do not own the data they refer to.

    Line 372, Patchset 18 (Latest): std::move(dns_over_https_server_ip_strs))),
    Adam Rice . unresolved

    std::move() should not be used with `dns_over_https_server_ip_strs` as it is an `initializer_list`.

    Line 388, Patchset 18 (Latest):DohProviderEntry::DohProviderEntry(DohProviderEntry&& other)
    : provider(std::move(other.provider)),
    feature(other.feature),
    ip_addresses(std::move(other.ip_addresses)),
    dns_over_tls_hostnames(std::move(other.dns_over_tls_hostnames)),
    doh_server_config(std::move(other.doh_server_config)),
    ui_name(std::move(other.ui_name)),
    privacy_policy(std::move(other.privacy_policy)),
    display_globally(other.display_globally),
    display_countries(std::move(other.display_countries)),
    logging_level(other.logging_level) {}
    Adam Rice . unresolved

    I think you should be able to just `= default` this one.
    ```suggestion


    DohProviderEntry::DohProviderEntry(DohProviderEntry&& other) = default;

    ```

    Open in Gerrit

    Related details

    Attention is currently required from:
    • John Lee
    • Mayur Patil
    • Prashant Nevase
    • suresh potti
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
      Gerrit-Change-Number: 6017776
      Gerrit-PatchSet: 18
      Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: John Lee <john...@chromium.org>
      Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
      Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
      Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
      Gerrit-Attention: John Lee <john...@chromium.org>
      Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
      Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
      Gerrit-Attention: suresh potti <sures...@microsoft.com>
      Gerrit-Comment-Date: Mon, 25 Nov 2024 10:14:01 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mayur Patil (Gerrit)

      unread,
      Nov 25, 2024, 6:16:06 AM11/25/24
      to Adam Rice, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
      Attention needed from Adam Rice, John Lee, Prashant Nevase and suresh potti

      Mayur Patil added 3 comments

      File net/dns/public/doh_provider_entry.cc
      Line 346, Patchset 18: std::move(provider), feature, std::move(dns_over_53_server_ip_strs),
      Adam Rice . resolved

      std::move() should not be used with `provider`, `dns_over_53_server_ip_strs`, `ui_name`, and `privacy_policy` as `string_view` and `initializer_list` objects are not usefully movable because they do not own the data they refer to.

      Mayur Patil

      Acknowledged

      Line 372, Patchset 18: std::move(dns_over_https_server_ip_strs))),
      Adam Rice . resolved

      std::move() should not be used with `dns_over_https_server_ip_strs` as it is an `initializer_list`.

      Mayur Patil

      Acknowledged

      Line 388, Patchset 18:DohProviderEntry::DohProviderEntry(DohProviderEntry&& other)

      : provider(std::move(other.provider)),
      feature(other.feature),
      ip_addresses(std::move(other.ip_addresses)),
      dns_over_tls_hostnames(std::move(other.dns_over_tls_hostnames)),
      doh_server_config(std::move(other.doh_server_config)),
      ui_name(std::move(other.ui_name)),
      privacy_policy(std::move(other.privacy_policy)),
      display_globally(other.display_globally),
      display_countries(std::move(other.display_countries)),
      logging_level(other.logging_level) {}
      Adam Rice . resolved

      I think you should be able to just `= default` this one.
      ```suggestion
      DohProviderEntry::DohProviderEntry(DohProviderEntry&& other) = default;

      ```

      Mayur Patil

      Acknowledged

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Rice
      • John Lee
      • Prashant Nevase
      • suresh potti
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
      Gerrit-Change-Number: 6017776
      Gerrit-PatchSet: 19
      Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: John Lee <john...@chromium.org>
      Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
      Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
      Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
      Gerrit-Attention: John Lee <john...@chromium.org>
      Gerrit-Attention: Adam Rice <ri...@chromium.org>
      Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
      Gerrit-Attention: suresh potti <sures...@microsoft.com>
      Gerrit-Comment-Date: Mon, 25 Nov 2024 11:15:50 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Adam Rice (Gerrit)

      unread,
      Nov 25, 2024, 8:41:49 AM11/25/24
      to Mayur Patil, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
      Attention needed from John Lee, Mayur Patil, Prashant Nevase and suresh potti

      Adam Rice voted and added 1 comment

      Votes added by Adam Rice

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 19 (Latest):
      Adam Rice . resolved

      My +1 seems to have vanished. Adding it back.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • John Lee
      • Mayur Patil
      • Prashant Nevase
      • suresh potti
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
      Gerrit-Change-Number: 6017776
      Gerrit-PatchSet: 19
      Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: John Lee <john...@chromium.org>
      Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
      Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
      Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
      Gerrit-Attention: John Lee <john...@chromium.org>
      Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
      Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
      Gerrit-Attention: suresh potti <sures...@microsoft.com>
      Gerrit-Comment-Date: Mon, 25 Nov 2024 13:41:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Prashant Nevase (Gerrit)

      unread,
      Nov 26, 2024, 3:13:25 AM11/26/24
      to Mayur Patil, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
      Attention needed from John Lee, Mayur Patil and suresh potti

      Prashant Nevase added 2 comments

      File net/dns/public/doh_provider_entry.h
      Line 101, Patchset 18: base::flat_set<std::string_view> dns_over_tls_hostnames,
      Prashant Nevase . unresolved

      Can you mention why this is changed to flat_set in cl description.

      File net/dns/public/doh_provider_entry.cc
      Line 324, Patchset 18: static const base::NoDestructor<DohProviderEntry::List> providers(
      Prashant Nevase . unresolved

      Can you add blank line before this?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • John Lee
      • Mayur Patil
      • suresh potti
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 19
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: John Lee <john...@chromium.org>
        Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
        Gerrit-Attention: suresh potti <sures...@microsoft.com>
        Gerrit-Comment-Date: Tue, 26 Nov 2024 08:13:09 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Prashant Nevase (Gerrit)

        unread,
        Nov 26, 2024, 3:13:29 AM11/26/24
        to Mayur Patil, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
        Attention needed from John Lee, Mayur Patil and suresh potti

        Prashant Nevase voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • John Lee
        • Mayur Patil
        • suresh potti
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 19
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: John Lee <john...@chromium.org>
        Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
        Gerrit-Attention: suresh potti <sures...@microsoft.com>
        Gerrit-Comment-Date: Tue, 26 Nov 2024 08:13:16 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        suresh potti (Gerrit)

        unread,
        Nov 26, 2024, 3:35:57 AM11/26/24
        to Mayur Patil, Prashant Nevase, Adam Rice, John Lee, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
        Attention needed from John Lee and Mayur Patil

        suresh potti added 3 comments

        File net/dns/public/doh_provider_entry_unittest.cc
        Line 24, Patchset 18: for (const DohProviderEntry* entry : DohProviderEntry::GetList()) {
        suresh potti . unresolved

        nit : const auto*

        Line 33, Patchset 18: for (const DohProviderEntry* entry : DohProviderEntry::GetList()) {
        suresh potti . unresolved

        nit : const auto*

        Line 44, Patchset 18: for (const std::string_view& s : entry->dns_over_tls_hostnames) {
        suresh potti . unresolved

        nit : const auto&

        Open in Gerrit

        Related details

        Attention is currently required from:
        • John Lee
        • Mayur Patil
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 19
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: John Lee <john...@chromium.org>
        Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
        Gerrit-Comment-Date: Tue, 26 Nov 2024 08:35:42 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mayur Patil (Gerrit)

        unread,
        Nov 26, 2024, 5:23:03 AM11/26/24
        to Prashant Nevase, Adam Rice, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
        Attention needed from Adam Rice, John Lee, Prashant Nevase and suresh potti

        Mayur Patil added 6 comments

        File net/dns/public/doh_provider_entry.h
        Line 101, Patchset 18: base::flat_set<std::string_view> dns_over_tls_hostnames,
        Prashant Nevase . resolved

        Can you mention why this is changed to flat_set in cl description.

        Mayur Patil

        Acknowledged

        File net/dns/public/doh_provider_entry.cc
        Line 324, Patchset 18: static const base::NoDestructor<DohProviderEntry::List> providers(
        Prashant Nevase . resolved

        Can you add blank line before this?

        Mayur Patil

        Done

        File net/dns/public/doh_provider_entry_unittest.cc
        Line 24, Patchset 18: for (const DohProviderEntry* entry : DohProviderEntry::GetList()) {
        suresh potti . resolved

        nit : const auto*

        Mayur Patil

        cant use auto* because GetList store array vector of raw_ptr of DohProviderEntry.

        error: variable 'entry' with type 'const auto *' has incompatible initializer of type 'const base::raw_ptr<const net::DohProviderEntry, partition_alloc::internal::RawPtrTraits::kMayDangle>'
        24 | for (const auto* entry : DohProviderEntry::GetList()) {
        Line 33, Patchset 18: for (const DohProviderEntry* entry : DohProviderEntry::GetList()) {
        suresh potti . resolved

        nit : const auto*

        Mayur Patil

        cant use auto* because GetList store array vector of raw_ptr of DohProviderEntry.

        error: variable 'entry' with type 'const auto *' has incompatible initializer of type 'const base::raw_ptr<const net::DohProviderEntry, partition_alloc::internal::RawPtrTraits::kMayDangle>'
        24 | for (const auto* entry : DohProviderEntry::GetList()) {
        Line 44, Patchset 18: for (const std::string_view& s : entry->dns_over_tls_hostnames) {
        suresh potti . resolved

        nit : const auto&

        Mayur Patil

        Done

        Line 44, Patchset 18: for (const std::string_view& s : entry->dns_over_tls_hostnames) {
        suresh potti . resolved

        nit : const auto&

        Mayur Patil

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Rice
        • John Lee
        • Prashant Nevase
        • suresh potti
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 20
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: John Lee <john...@chromium.org>
        Gerrit-Attention: Adam Rice <ri...@chromium.org>
        Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Attention: suresh potti <sures...@microsoft.com>
        Gerrit-Comment-Date: Tue, 26 Nov 2024 10:22:50 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Prashant Nevase <pne...@microsoft.com>
        Comment-In-Reply-To: suresh potti <sures...@microsoft.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Adam Rice (Gerrit)

        unread,
        Nov 27, 2024, 1:14:20 AM11/27/24
        to Mayur Patil, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
        Attention needed from John Lee, Mayur Patil, Prashant Nevase and suresh potti

        Adam Rice voted and added 1 comment

        Votes added by Adam Rice

        Code-Review+1

        1 comment

        Patchset-level comments
        File-level comment, Patchset 21 (Latest):
        Adam Rice . resolved

        PS21 still lgtm

        Open in Gerrit

        Related details

        Attention is currently required from:
        • John Lee
        • Mayur Patil
        • Prashant Nevase
        • suresh potti
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 21
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: John Lee <john...@chromium.org>
        Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
        Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Attention: suresh potti <sures...@microsoft.com>
        Gerrit-Comment-Date: Wed, 27 Nov 2024 06:14:07 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rebekah Potter (Gerrit)

        unread,
        Dec 2, 2024, 1:28:09 PM12/2/24
        to Mayur Patil, Adam Rice, Prashant Nevase, John Lee, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
        Attention needed from John Lee, Mayur Patil, Prashant Nevase and suresh potti

        Rebekah Potter voted and added 1 comment

        Votes added by Rebekah Potter

        Code-Review+1

        1 comment

        Patchset-level comments
        Rebekah Potter . resolved

        lgtm for settings_secure_dns_handler_browsertest.cc

        Open in Gerrit

        Related details

        Attention is currently required from:
        • John Lee
        • Mayur Patil
        • Prashant Nevase
        • suresh potti
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 21
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: John Lee <john...@chromium.org>
        Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
        Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Attention: suresh potti <sures...@microsoft.com>
        Gerrit-Comment-Date: Mon, 02 Dec 2024 18:27:58 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        John Lee (Gerrit)

        unread,
        Dec 2, 2024, 5:11:36 PM12/2/24
        to Mayur Patil, John Lee, Rebekah Potter, Adam Rice, Prashant Nevase, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
        Attention needed from Mayur Patil, Prashant Nevase and suresh potti

        John Lee voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Mayur Patil
        • Prashant Nevase
        • suresh potti
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 21
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
        Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Attention: suresh potti <sures...@microsoft.com>
        Gerrit-Comment-Date: Mon, 02 Dec 2024 22:11:21 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Mayur Patil (Gerrit)

        unread,
        Dec 2, 2024, 10:37:30 PM12/2/24
        to John Lee, Rebekah Potter, Adam Rice, Prashant Nevase, suresh potti, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
        Attention needed from Prashant Nevase and suresh potti

        Mayur Patil voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Prashant Nevase
        • suresh potti
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 21
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        Gerrit-Attention: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Attention: suresh potti <sures...@microsoft.com>
        Gerrit-Comment-Date: Tue, 03 Dec 2024 03:37:17 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Dec 2, 2024, 11:33:17 PM12/2/24
        to Mayur Patil, John Lee, Rebekah Potter, Adam Rice, Prashant Nevase, suresh potti, chromium...@chromium.org, net-r...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        Use initializer_list and string_view in DohProviderEntry.

        This change updates string to string_view and replaces std::set with
        std::initializer_list in the DohProviderEntry files where needed.Also
        added base::flat_set to improve memory efficiencies.We use
        std::initializer_list because it is only required for the constructor and looping.
        Bug: 355256384
        Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Commit-Queue: Mayur Patil <patil...@microsoft.com>
        Reviewed-by: John Lee <john...@chromium.org>
        Reviewed-by: Adam Rice <ri...@chromium.org>
        Reviewed-by: Rebekah Potter <rbpo...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1390796}
        Files:
        • M chrome/browser/ui/webui/settings/settings_secure_dns_handler_browsertest.cc
        • M net/dns/dns_util.cc
        • M net/dns/public/doh_provider_entry.cc
        • M net/dns/public/doh_provider_entry.h
        • M net/dns/public/doh_provider_entry_unittest.cc
        Change size: L
        Delta: 5 files changed, 318 insertions(+), 290 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Adam Rice, +1 by Rebekah Potter, +1 by John Lee
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7d5a140dab3c80f8b1166c50e366343e8863c46b
        Gerrit-Change-Number: 6017776
        Gerrit-PatchSet: 22
        Gerrit-Owner: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: John Lee <john...@chromium.org>
        Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
        Gerrit-Reviewer: Prashant Nevase <pne...@microsoft.com>
        Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Reviewer: suresh potti <sures...@microsoft.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages