Move SupervisedUserUrlFilter to components [chromium/src : main]

4 views
Skip to first unread message

Anthi Orfanou (Gerrit)

unread,
Feb 20, 2023, 10:40:36 AM2/20/23
to chrome-family...@google.com, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez

Attention is currently required from: chrome-family...@google.com.

Anthi Orfanou would like chrome-family...@google.com to review this change.

View Change

Move SupervisedUserUrlFilter to components

This factoring is done to allow iOS support of parental controls.
The parts that need to be derived from content (which cannot be
moved to components) are moved into a separate method which is
passed as a callback to the url filter.

Bug: b/265758915
Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
---
M chrome/BUILD.gn
M chrome/android/BUILD.gn
M chrome/browser/BUILD.gn
M chrome/browser/feedback/android/family_info_feedback_source_unittest.cc
M chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc
M chrome/browser/renderer_context_menu/render_view_context_menu.cc
M chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
M chrome/browser/search/search.cc
M chrome/browser/search/search_unittest.cc
D chrome/browser/supervised_user/extensions_utils.h
M chrome/browser/supervised_user/parental_control_metrics_unittest.cc
R chrome/browser/supervised_user/supervised_user_browser_utils.cc
A chrome/browser/supervised_user/supervised_user_browser_utils.h
M chrome/browser/supervised_user/supervised_user_navigation_observer.cc
M chrome/browser/supervised_user/supervised_user_navigation_observer.h
M chrome/browser/supervised_user/supervised_user_navigation_throttle.cc
M chrome/browser/supervised_user/supervised_user_navigation_throttle.h
M chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
M chrome/browser/supervised_user/supervised_user_pref_store.cc
M chrome/browser/supervised_user/supervised_user_service.cc
M chrome/browser/supervised_user/supervised_user_service.h
M chrome/browser/supervised_user/supervised_user_service_factory.cc
M chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc
M chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc
M chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.cc
M chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h
M chrome/browser/ui/webui/history/browsing_history_handler.cc
M chrome/test/BUILD.gn
M components/supervised_user/DEPS
M components/supervised_user/core/browser/BUILD.gn
R components/supervised_user/core/browser/supervised_user_url_filter.cc
R components/supervised_user/core/browser/supervised_user_url_filter.h
R components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc
M components/supervised_user/core/common/supervised_user_constants.cc
M components/supervised_user/core/common/supervised_user_constants.h
35 files changed, 236 insertions(+), 201 deletions(-)


To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
Gerrit-Change-Number: 4270994
Gerrit-PatchSet: 4
Gerrit-Owner: Anthi Orfanou <ant...@google.com>
Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
Gerrit-CC: Nohemi Fernandez <fern...@chromium.org>
Gerrit-MessageType: newchange

Anthi Orfanou (Gerrit)

unread,
Feb 20, 2023, 10:40:44 AM2/20/23
to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com, Nohemi Fernandez, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: chrome-family...@google.com.

View Change

    To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
    Gerrit-Change-Number: 4270994
    Gerrit-PatchSet: 4
    Gerrit-Owner: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-CC: Nohemi Fernandez <fern...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Feb 2023 15:40:32 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Anthi Orfanou (Gerrit)

    unread,
    Feb 20, 2023, 10:41:38 AM2/20/23
    to Nohemi Fernandez, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com

    Attention is currently required from: Nohemi Fernandez, chrome-family...@google.com.

    Anthi Orfanou would like Nohemi Fernandez to review this change.

    To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
    Gerrit-Change-Number: 4270994
    Gerrit-PatchSet: 4
    Gerrit-Owner: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
    Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>

    Anthi Orfanou (Gerrit)

    unread,
    Feb 20, 2023, 10:42:49 AM2/20/23
    to Alex Ilin, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, chrome-family...@google.com

    Attention is currently required from: Alex Ilin, Anthi Orfanou, Nohemi Fernandez, chrome-family...@google.com.

    Anthi Orfanou would like Alex Ilin to review this change.

    Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
    Gerrit-Attention: Anthi Orfanou <ant...@google.com>
    Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
    Gerrit-Attention: Alex Ilin <alex...@chromium.org>
    Gerrit-MessageType: newchange

    Anthi Orfanou (Gerrit)

    unread,
    Feb 20, 2023, 10:42:55 AM2/20/23
    to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Alex Ilin, Nohemi Fernandez, chrome-family...@google.com, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Alex Ilin, Anthi Orfanou, Nohemi Fernandez, chrome-family...@google.com.

    Patch set 4:Commit-Queue +1

    View Change

      To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
      Gerrit-Change-Number: 4270994
      Gerrit-PatchSet: 4
      Gerrit-Owner: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
      Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
      Gerrit-Attention: Anthi Orfanou <ant...@google.com>
      Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
      Gerrit-Attention: Alex Ilin <alex...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Feb 2023 15:42:45 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      gwsq (Gerrit)

      unread,
      Feb 20, 2023, 10:44:56 AM2/20/23
      to Tomek Jurkiewicz, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Anthi Orfanou, Alex Ilin, Nohemi Fernandez, chrome-family...@google.com

      Attention is currently required from: Nohemi Fernandez, Tomek Jurkiewicz, chrome-family...@google.com.

      gwsq would like Tomek Jurkiewicz to review this change authored by Anthi Orfanou.

      To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
      Gerrit-Change-Number: 4270994
      Gerrit-PatchSet: 4
      Gerrit-Owner: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
      Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
      Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
      Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
      Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
      Gerrit-MessageType: newchange

      gwsq (Gerrit)

      unread,
      Feb 20, 2023, 10:44:57 AM2/20/23
      to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com, Anthi Orfanou, Tomek Jurkiewicz, Alex Ilin, Nohemi Fernandez

      Attention is currently required from: Nohemi Fernandez, Tomek Jurkiewicz.

      Anthi Orfanou has uploaded this change for review.

      Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>

      gwsq (Gerrit)

      unread,
      Feb 20, 2023, 10:45:11 AM2/20/23
      to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Nohemi Fernandez, Chromium LUCI CQ, chromium...@chromium.org

      Attention is currently required from: Nohemi Fernandez, Tomek Jurkiewicz.


      Reviewer source(s):
      t...@google.com is from context(googleclient/chrome/chromium_gwsq/chrome/browser/supervised_user/config.gwsq)

      View Change

        To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
        Gerrit-Change-Number: 4270994
        Gerrit-PatchSet: 4
        Gerrit-Owner: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
        Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
        Gerrit-Comment-Date: Mon, 20 Feb 2023 15:44:56 +0000

        Anthi Orfanou (Gerrit)

        unread,
        Feb 20, 2023, 11:00:19 AM2/20/23
        to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Nohemi Fernandez, Chromium LUCI CQ, chromium...@chromium.org

        Attention is currently required from: Nohemi Fernandez, Tomek Jurkiewicz.

        View Change

        1 comment:

        To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
        Gerrit-Change-Number: 4270994
        Gerrit-PatchSet: 4
        Gerrit-Owner: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
        Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
        Gerrit-Comment-Date: Mon, 20 Feb 2023 16:00:11 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Gerrit-MessageType: comment

        Tomek Jurkiewicz (Gerrit)

        unread,
        Feb 20, 2023, 12:22:05 PM2/20/23
        to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com, Alex Ilin, Nohemi Fernandez, Chromium LUCI CQ, chromium...@chromium.org

        Attention is currently required from: Anthi Orfanou, Nohemi Fernandez.

        View Change

        3 comments:

        • File chrome/browser/supervised_user/supervised_user_browser_utils.h:

          • Patch Set #4:

            This doesn't look like moved with `git mv`. The problem is that the history of the file won't be preserved.

        • File chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc:

          • Patch Set #4, Line 31: base::BindRepeating([]() { return std::string(); }));

            The parameter list of lambda literal is not required here (as the lambda is parameterless).

        • File components/supervised_user/core/browser/supervised_user_url_filter.h:

        To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
        Gerrit-Change-Number: 4270994
        Gerrit-PatchSet: 4
        Gerrit-Owner: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
        Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Anthi Orfanou <ant...@google.com>
        Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Comment-Date: Mon, 20 Feb 2023 17:21:56 +0000

        Anthi Orfanou (Gerrit)

        unread,
        Feb 21, 2023, 9:00:56 AM2/21/23
        to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Nohemi Fernandez, Chromium LUCI CQ, chromium...@chromium.org

        Attention is currently required from: Alex Ilin, Nohemi Fernandez, Tomek Jurkiewicz.

        View Change

        3 comments:

        • File chrome/browser/supervised_user/supervised_user_browser_utils.h:

          • Patch Set #4:

            This doesn't look like moved with `git mv`. […]

            I tried to recover this file (uploaded a new patchest with the old file, see diff between patchsets 5 and 6) and then used git mv to rename it (patchset 7), but git still treats it as a file deletion...
            The file is relatively new (only one more version). Do we necessarily need to preserve the history?

        • File chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc:

          • Patch Set #4, Line 31: base::BindRepeating([]() { return std::string(); }));

            The parameter list of lambda literal is not required here (as the lambda is parameterless).

          • Done

        • File components/supervised_user/core/browser/supervised_user_url_filter.h:

          • The explicit keyword was used here to prevent the creation of a converting constructor (1 parameter) […]

            Done

        To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
        Gerrit-Change-Number: 4270994
        Gerrit-PatchSet: 7
        Gerrit-Owner: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
        Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
        Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
        Gerrit-Attention: Alex Ilin <alex...@chromium.org>
        Gerrit-Comment-Date: Tue, 21 Feb 2023 14:00:37 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Tomek Jurkiewicz <t...@google.com>
        Gerrit-MessageType: comment

        Anthi Orfanou (Gerrit)

        unread,
        Feb 21, 2023, 11:33:54 AM2/21/23
        to Nohemi Fernandez, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Tomek Jurkiewicz, Alex Ilin

        Attention is currently required from: Tomek Jurkiewicz.

        Anthi Orfanou removed Nohemi Fernandez from this change.

        View Change

        35 files changed, 238 insertions(+), 202 deletions(-)


        To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
        Gerrit-Change-Number: 4270994
        Gerrit-PatchSet: 10
        Gerrit-Owner: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
        Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
        Gerrit-CC: gwsq

        Anthi Orfanou (Gerrit)

        unread,
        Feb 21, 2023, 11:33:57 AM2/21/23
        to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

        Attention is currently required from: Tomek Jurkiewicz.

        View Change

        1 comment:

        • Patchset:

          • Patch Set #10:

            I am sorry, I accidentally uploaded a wrong patch, which was mean to go on a linked CL (not on this one, I accidentally did commit amend and messed up this). I have re-uploaded the right patch.

        To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
        Gerrit-Change-Number: 4270994
        Gerrit-PatchSet: 10
        Gerrit-Owner: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
        Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
        Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
        Gerrit-Comment-Date: Tue, 21 Feb 2023 16:33:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Gerrit-MessageType: comment

        Anthi Orfanou (Gerrit)

        unread,
        Feb 21, 2023, 11:51:37 AM2/21/23
        to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

        Attention is currently required from: Alex Ilin, Tomek Jurkiewicz.

        View Change

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 12
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Comment-Date: Tue, 21 Feb 2023 16:51:29 +0000

          Alex Ilin (Gerrit)

          unread,
          Feb 21, 2023, 2:01:27 PM2/21/23
          to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Anthi Orfanou, Tomek Jurkiewicz.

          View Change

          6 comments:

          • File chrome/browser/supervised_user/supervised_user_browser_utils.cc:

            • Patch Set #12, Line 19:

              std::string GetCountryCode() {
              std::string country;
              variations::VariationsService* variations_service =
              g_browser_process->variations_service();
              if (variations_service) {
              country = variations_service->GetStoredPermanentCountry();
              if (country.empty()) {
              country = variations_service->GetLatestCountry();
              }
              }
              return country;
              }

              nit: Please move it below the `IsSupportedChromeExtensionURL()` so that the declaration order in the .h file matches the definition order in the .cc file.

              I can no longer find this rule in the style guide but I think it's still useful for visual navigation.

          • File components/supervised_user/core/browser/supervised_user_url_filter.h:

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 12
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Comment-Date: Tue, 21 Feb 2023 19:01:15 +0000

          Nohemi Fernandez (Gerrit)

          unread,
          Feb 23, 2023, 4:50:01 AM2/23/23
          to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Anthi Orfanou, Tomek Jurkiewicz.

          View Change

          1 comment:

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

            • Patch Set #12, Line 155: CountryCallback country_callback

              I would prefer to limit the number of callbacks that we introduce in the constructor to functions that are not available across platforms (e.g. extensions is only relevant for Desktop / ChromeOS platforms).

              Here you can pass in the `VariationsService` directly and use it to retrieve the country below. This will also allow iOS to follow the same pattern for retrieving a country.

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 12
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Comment-Date: Thu, 23 Feb 2023 09:49:54 +0000

          Tomek Jurkiewicz (Gerrit)

          unread,
          Feb 23, 2023, 9:50:26 AM2/23/23
          to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, Tricium, chrome-family...@google.com, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Alex Ilin, Anthi Orfanou.

          View Change

          1 comment:

          • File chrome/browser/supervised_user/supervised_user_browser_utils.h:

            • Patch Set #4:

              I don't think Git/Gerrit understands that a file was moved with a `git mv` command. […]

              Yes, something I didn't know when making the comment (sorry, I just inferred that from some other very popular vc system that we use at google :))

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 19
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Feb 2023 14:50:18 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Anthi Orfanou <ant...@google.com>
          Comment-In-Reply-To: Alex Ilin <alex...@chromium.org>

          Anthi Orfanou (Gerrit)

          unread,
          Feb 23, 2023, 10:29:54 AM2/23/23
          to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Alex Ilin, Nohemi Fernandez, Tomek Jurkiewicz.

          View Change

          8 comments:

          • File chrome/browser/supervised_user/supervised_user_browser_utils.h:

            • Patch Set #4:

              I don't think Git/Gerrit understands that a file was moved with a `git mv` command. […]

            • Done

          • File chrome/browser/supervised_user/supervised_user_browser_utils.cc:

            • Patch Set #12, Line 19:

              std::string GetCountryCode() {
              std::string country;
              variations::VariationsService* variations_service =
              g_browser_process->variations_service();
              if (variations_service) {
              country = variations_service->GetStoredPermanentCountry();
              if (country.empty()) {
              country = variations_service->GetLatestCountry();
              }
              }
              return country;
              }

            • nit: Please move it below the `IsSupportedChromeExtensionURL()` so that the declaration order in the […]

              The method was removed.

          • File components/supervised_user/core/browser/supervised_user_url_filter.h:

            • Duplicating this function in three different files feels like a regression. […]

              done

            • Patch Set #12, Line 29: supervised_user

              `SupervisedUserURLFilter` also should be put inside of the `supervised_user` namespace.

            • Done

            • nit: `using CountryCallback = base::RepeatingCallback<std::string()>` […]

              I'll keep this in mind, this specific instance is removed.

            • alternative naming suggestion: `CountryGetter` by analogy with [1] […]

              Removed.

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

            • nit: should be redundant after you move this class in the namespace.

            • Done

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 20
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Feb 2023 15:29:45 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Anthi Orfanou <ant...@google.com>
          Comment-In-Reply-To: Nohemi Fernandez <fern...@chromium.org>

          Nohemi Fernandez (Gerrit)

          unread,
          Feb 23, 2023, 12:43:55 PM2/23/23
          to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Alex Ilin, Anthi Orfanou, Tomek Jurkiewicz.

          Patch set 20:Code-Review +1

          View Change

          2 comments:

          • Patchset:

            • Patch Set #20:

              Overall LGTM for the structure, leaving it to Alex and Tomek for additional detailed review.

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

            • Patch Set #20, Line 157: variations::VariationsService* variations_service

              This looks good if we want to have exactly the same behavior as previously. To go one step further in ensuring we don't pull in unnecessary dependencies, could you confirm whether it is possible for the country to change during the lifecycle of the service?

              If the country does not change dynamically it may be enough to pass it as a parameter in the factory, otherwise keeping it as is works well.

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 20
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Feb 2023 17:43:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Gerrit-MessageType: comment

          Anthi Orfanou (Gerrit)

          unread,
          Feb 23, 2023, 1:04:09 PM2/23/23
          to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Alex Ilin, Nohemi Fernandez, Tomek Jurkiewicz.

          View Change

          1 comment:

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 20
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Feb 2023 18:04:00 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-MessageType: comment

          Alex Ilin (Gerrit)

          unread,
          Feb 24, 2023, 6:02:02 AM2/24/23
          to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Anthi Orfanou, Nohemi Fernandez, Tomek Jurkiewicz.

          View Change

          2 comments:

          • File components/supervised_user/core/browser/supervised_user_url_filter.h:

            • Patch Set #20, Line 30: namespace supervised_user {

              No need to open the `supervised_user` namespace twice. You can move the `SupervisedUserDenylist` forward declaration below, before SupervisedUserURLFilter:

              ```
              namespace supervised_user {

              class SupervisedUserDenylist;

              // This class manages the filtering behavior for URLs, i.e. it tells callers
              // if a URL should be allowed or blocked. It uses information ...
              class SupervisedUserURLFilter {
              // ...
              };
              }
              ```

              From C++ style guide:

              Namespaces wrap the entire source file after includes, gflags definitions/declarations and forward declarations of classes from other namespaces.

              https://google.github.io/styleguide/cppguide.html#Namespaces

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

            • Patch Set #20, Line 153: namespace supervised_user {

              Please avoid closing and re-opening the same namespace repeatedly. You can open the `supervised_user` namespace at the top of the file only once. `supervised_user` might have a nested anonymous namespace like this:

              ```
              namespace supervised_user {

              namespace {

              bool IsSameDomain(const GURL& url1, const GURL& url2) {
              return net::registry_controlled_domains::SameDomainOrHost(
              url1, url2, EXCLUDE_PRIVATE_REGISTRIES);
              }
              bool SetFilteringBehaviorResult(
              SupervisedUserURLFilter::FilteringBehavior behavior,
              SupervisedUserURLFilter::FilteringBehavior* result) {
              // ...
              }
              // ...
              constexpr char kBlockedSitesCountHistogramName[] =
              "FamilyUser.ManagedSiteListCount.Blocked";

              } // namespace

              SupervisedUserURLFilter::SupervisedUserURLFilter(
              ValidateURLSupportCallback check_webstore_url_callback,
              variations::VariationsService* variations_service) // ...

              // ...

              // move this method down below, close to other `SupervisedUserURLFilter` methods.
              SupervisedUserURLFilter::FilteringBehavior
              GetBehaviorFromSafeSearchClassification(
              safe_search_api::Classification classification) {
              // ...
              }

              } // namespace supervised_user

              ```

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 20
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Comment-Date: Fri, 24 Feb 2023 11:01:55 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Gerrit-MessageType: comment

          Anthi Orfanou (Gerrit)

          unread,
          Feb 27, 2023, 9:38:45 AM2/27/23
          to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Alex Ilin, Nohemi Fernandez, Tomek Jurkiewicz.

          Patch set 24:Commit-Queue +1

          View Change

          4 comments:

            • No need to open the `supervised_user` namespace twice. […]

              Done

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

            • Please avoid closing and re-opening the same namespace repeatedly. […]

              Done

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 24
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Comment-Date: Mon, 27 Feb 2023 14:38:37 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Anthi Orfanou <ant...@google.com>
          Comment-In-Reply-To: Alex Ilin <alex...@chromium.org>
          Gerrit-MessageType: comment

          Anthi Orfanou (Gerrit)

          unread,
          Feb 27, 2023, 9:47:14 AM2/27/23
          to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org

          Attention is currently required from: Anthi Orfanou.

          Anthi Orfanou uploaded patch set #26 to this change.

          View Change

          Move SupervisedUserUrlFilter to components

          This factoring is done to allow iOS support of parental controls.
          The parts that need to be derived from content (which cannot be
          moved to components) are moved into a separate method which is
          accessed through a new interface (delegate) on the url filter.


          Bug: b/265758915
          Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          ---
          M chrome/BUILD.gn
          M chrome/android/BUILD.gn
          M chrome/browser/BUILD.gn
          M chrome/browser/feedback/android/family_info_feedback_source.cc

          M chrome/browser/feedback/android/family_info_feedback_source_unittest.cc
          M chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc
          M chrome/browser/renderer_context_menu/render_view_context_menu.cc
          M chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
          M chrome/browser/search/search.cc
          M chrome/browser/search/search_unittest.cc
          D chrome/browser/supervised_user/extensions_utils.h
          M chrome/browser/supervised_user/parental_control_metrics_unittest.cc
          R chrome/browser/supervised_user/supervised_user_browser_utils.cc
          A chrome/browser/supervised_user/supervised_user_browser_utils.h
          M chrome/browser/supervised_user/supervised_user_navigation_observer.cc
          M chrome/browser/supervised_user/supervised_user_navigation_observer.h
          M chrome/browser/supervised_user/supervised_user_navigation_throttle.cc
          M chrome/browser/supervised_user/supervised_user_navigation_throttle.h
          M chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
          M chrome/browser/supervised_user/supervised_user_pref_store.cc
          M chrome/browser/supervised_user/supervised_user_service.cc
          M chrome/browser/supervised_user/supervised_user_service.h
          M chrome/browser/supervised_user/supervised_user_service_factory.cc
          M chrome/browser/supervised_user/supervised_user_service_factory.h
          M chrome/browser/supervised_user/supervised_user_service_unittest.cc

          M chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc
          M chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc
          M chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.cc
          M chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h
          M chrome/browser/ui/webui/history/browsing_history_handler.cc
          M chrome/test/BUILD.gn
          M components/supervised_user/DEPS
          M components/supervised_user/core/browser/BUILD.gn
          R components/supervised_user/core/browser/supervised_user_url_filter.cc
          R components/supervised_user/core/browser/supervised_user_url_filter.h
          R components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc
          M components/supervised_user/core/common/supervised_user_constants.cc
          M components/supervised_user/core/common/supervised_user_constants.h
          38 files changed, 528 insertions(+), 392 deletions(-)

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 26
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-MessageType: newpatchset

          Anthi Orfanou (Gerrit)

          unread,
          Feb 28, 2023, 4:56:12 AM2/28/23
          to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org

          Attention is currently required from: Alex Ilin, Tomek Jurkiewicz.

          Anthi Orfanou uploaded patch set #27 to this change.

          View Change

          Move SupervisedUserUrlFilter to components

          This refactoring is done to allow iOS support of parental controls.
          38 files changed, 513 insertions(+), 392 deletions(-)

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 27
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-MessageType: newpatchset

          Alex Ilin (Gerrit)

          unread,
          Feb 28, 2023, 7:16:56 AM2/28/23
          to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Anthi Orfanou, Tomek Jurkiewicz.

          View Change

          6 comments:

          • File chrome/browser/supervised_user/supervised_user_service.h:

            • Patch Set #27, Line 267: service_delegate

              nit: I'd go for the `url_filter_delegate` name here to make it clearer that this is a delegate for the `url_filter`. Imagine that you have two classes that need a ServiceDelegate.

          • File chrome/browser/supervised_user/supervised_user_service_factory.h:

            • Patch Set #27, Line 44: class FilterServiceDelegateImpl

              supervised_user_service_factory.h shouldn't expose this class.

              You could either declare this class in the supervised_user_service_factory.cc or in a separate file .h file.

          • File chrome/browser/supervised_user/supervised_user_service_factory.cc:

          • File components/supervised_user/core/browser/supervised_user_url_filter.h:

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

            • Patch Set #27, Line 482: get()

              no need to call `get()` here. std::unique_ptr<> overloads `operator->()` so you can simply write `service_delegate_->GetCountryCode();`

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 27
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Comment-Date: Tue, 28 Feb 2023 12:16:50 +0000

          Anthi Orfanou (Gerrit)

          unread,
          Mar 1, 2023, 12:08:24 PM3/1/23
          to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Alex Ilin, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Alex Ilin, Nohemi Fernandez, Tomek Jurkiewicz.

          View Change

          6 comments:

          • File chrome/browser/supervised_user/supervised_user_service.h:

            • nit: I'd go for the `url_filter_delegate` name here to make it clearer that this is a delegate for t […]

              Done

          • File chrome/browser/supervised_user/supervised_user_service_factory.h:

            • supervised_user_service_factory.h shouldn't expose this class. […]

              Done

          • File chrome/browser/supervised_user/supervised_user_service_factory.cc:

            • Done

            • Patch Set #27, Line 79: GetCountryCode

              Do you want to keep this as a standalone function? If not, you could just inline its code here.

            • Done

          • File components/supervised_user/core/browser/supervised_user_url_filter.h:

            • nit: does this name imply `SupervisedUserServiceDelegate`? I'd probably just name it `Delegate` sinc […]

              No, the name does not relate to the supervised user service, I just names it like that to specify that it is an entry point to other services (e.g. variation service). But since there is no other delegate within the class, I renamed.

              I think I will try to keep things simple for now, and introduces interfaces as needed within supervised_user as I expect they will have different lifetimes (delegates per request vs per service).

          • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

            • no need to call `get()` here. […]

              Done

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 29
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Attention: Alex Ilin <alex...@chromium.org>
          Gerrit-Attention: Tomek Jurkiewicz <t...@google.com>
          Gerrit-Comment-Date: Wed, 01 Mar 2023 17:08:16 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No

          Alex Ilin (Gerrit)

          unread,
          Mar 1, 2023, 12:37:44 PM3/1/23
          to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Anthi Orfanou.

          Patch set 29:Code-Review +1

          View Change

          3 comments:

          • Patchset:

          • File components/supervised_user/core/browser/supervised_user_url_filter.h:

            • No, the name does not relate to the supervised user service, I just names it like that to specify th […]

              Sounds good to me.

          • File components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc:

          To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
          Gerrit-Change-Number: 4270994
          Gerrit-PatchSet: 29
          Gerrit-Owner: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
          Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
          Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
          Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Anthi Orfanou <ant...@google.com>
          Gerrit-Comment-Date: Wed, 01 Mar 2023 17:37:35 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Anthi Orfanou <ant...@google.com>

          Anthi Orfanou (Gerrit)

          unread,
          Mar 7, 2023, 11:58:39 AM3/7/23
          to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Chromium LUCI CQ, chromium...@chromium.org

          Attention is currently required from: Alex Ilin.

          View Change

            To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
            Gerrit-Change-Number: 4270994
            Gerrit-PatchSet: 30
            Gerrit-Owner: Anthi Orfanou <ant...@google.com>
            Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
            Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
            Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
            Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
            Gerrit-CC: gwsq
            Gerrit-Attention: Alex Ilin <alex...@chromium.org>
            Gerrit-Comment-Date: Tue, 07 Mar 2023 16:58:19 +0000

            Anthi Orfanou (Gerrit)

            unread,
            Mar 7, 2023, 11:58:44 AM3/7/23
            to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Chromium LUCI CQ, chromium...@chromium.org

            Attention is currently required from: Alex Ilin.

            Patch set 30:Commit-Queue +2

            View Change

              To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
              Gerrit-Change-Number: 4270994
              Gerrit-PatchSet: 30
              Gerrit-Owner: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
              Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
              Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Attention: Alex Ilin <alex...@chromium.org>
              Gerrit-Comment-Date: Tue, 07 Mar 2023 16:58:24 +0000

              Anthi Orfanou (Gerrit)

              unread,
              Mar 7, 2023, 12:15:23 PM3/7/23
              to Dominic Battré, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Alex Ilin, Nohemi Fernandez, Tomek Jurkiewicz

              Attention is currently required from: Alex Ilin, Dominic Battré.

              Anthi Orfanou would like Dominic Battré to review this change.

              View Change

              M chrome/browser/supervised_user/supervised_user_service_unittest.cc
              M chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc
              M chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc
              M chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.cc
              M chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h
              M chrome/browser/ui/webui/history/browsing_history_handler.cc
              M chrome/test/BUILD.gn
              M components/supervised_user/DEPS
              M components/supervised_user/core/browser/BUILD.gn
              R components/supervised_user/core/browser/supervised_user_url_filter.cc
              R components/supervised_user/core/browser/supervised_user_url_filter.h
              R components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc
              M components/supervised_user/core/common/supervised_user_constants.cc
              M components/supervised_user/core/common/supervised_user_constants.h
              37 files changed, 509 insertions(+), 392 deletions(-)


              To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
              Gerrit-Change-Number: 4270994
              Gerrit-PatchSet: 30
              Gerrit-Owner: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
              Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Dominic Battré <bat...@chromium.org>
              Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
              Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Attention: Dominic Battré <bat...@chromium.org>
              Gerrit-Attention: Alex Ilin <alex...@chromium.org>
              Gerrit-MessageType: newchange

              Anthi Orfanou (Gerrit)

              unread,
              Mar 7, 2023, 12:15:37 PM3/7/23
              to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Dominic Battré, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Chromium LUCI CQ, chromium...@chromium.org

              Attention is currently required from: Alex Ilin, Dominic Battré.

              View Change

              1 comment:

              To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
              Gerrit-Change-Number: 4270994
              Gerrit-PatchSet: 30
              Gerrit-Owner: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
              Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Dominic Battré <bat...@chromium.org>
              Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
              Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Attention: Dominic Battré <bat...@chromium.org>
              Gerrit-Attention: Alex Ilin <alex...@chromium.org>
              Gerrit-Comment-Date: Tue, 07 Mar 2023 17:15:17 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Gerrit-MessageType: comment

              Anthi Orfanou (Gerrit)

              unread,
              Mar 7, 2023, 12:16:10 PM3/7/23
              to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Dominic Battré, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Chromium LUCI CQ, chromium...@chromium.org

              Attention is currently required from: Alex Ilin, Dominic Battré.

              View Change

              1 comment:

              • File components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc:

                • Done

              To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
              Gerrit-Change-Number: 4270994
              Gerrit-PatchSet: 30
              Gerrit-Owner: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
              Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Dominic Battré <bat...@chromium.org>
              Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
              Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Attention: Dominic Battré <bat...@chromium.org>
              Gerrit-Attention: Alex Ilin <alex...@chromium.org>
              Gerrit-Comment-Date: Tue, 07 Mar 2023 17:15:51 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No

              Dominic Battré (Gerrit)

              unread,
              Mar 7, 2023, 4:30:11 PM3/7/23
              to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Chromium LUCI CQ, chromium...@chromium.org

              Attention is currently required from: Anthi Orfanou.

              Patch set 30:Code-Review +1

              View Change

              1 comment:

              • Patchset:

                • Patch Set #30:

                  components/supervised_user/DEPS LGTM (did not check the rest)

              To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
              Gerrit-Change-Number: 4270994
              Gerrit-PatchSet: 30
              Gerrit-Owner: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
              Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
              Gerrit-Reviewer: Dominic Battré <bat...@chromium.org>
              Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
              Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Attention: Anthi Orfanou <ant...@google.com>
              Gerrit-Comment-Date: Tue, 07 Mar 2023 21:29:52 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              Gerrit-MessageType: comment

              Anthi Orfanou (Gerrit)

              unread,
              Mar 8, 2023, 5:00:11 AM3/8/23
              to chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Dominic Battré, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, Chromium LUCI CQ, chromium...@chromium.org

              Attention is currently required from: Anthi Orfanou.

              Patch set 30:Commit-Queue +2

              View Change

                To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: chromium/src
                Gerrit-Branch: main
                Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
                Gerrit-Change-Number: 4270994
                Gerrit-PatchSet: 30
                Gerrit-Owner: Anthi Orfanou <ant...@google.com>
                Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
                Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
                Gerrit-Reviewer: Dominic Battré <bat...@chromium.org>
                Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
                Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
                Gerrit-CC: gwsq
                Gerrit-Attention: Anthi Orfanou <ant...@google.com>
                Gerrit-Comment-Date: Wed, 08 Mar 2023 09:59:50 +0000

                Chromium LUCI CQ (Gerrit)

                unread,
                Mar 8, 2023, 5:02:22 AM3/8/23
                to Anthi Orfanou, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Dominic Battré, Alex Ilin, Nohemi Fernandez, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, chromium...@chromium.org

                Chromium LUCI CQ submitted this change.

                View Change

                Approvals: Dominic Battré: Looks good to me Anthi Orfanou: Commit Alex Ilin: Looks good to me
                Move SupervisedUserUrlFilter to components

                This refactoring is done to allow iOS support of parental controls.
                The parts that need to be derived from content (which cannot be
                moved to components) are moved into a separate method which is
                accessed through a new interface (delegate) on the url filter.

                Bug: b/265758915
                Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
                Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4270994
                Reviewed-by: Alex Ilin <alex...@chromium.org>
                Reviewed-by: Dominic Battré <bat...@chromium.org>
                Commit-Queue: Anthi Orfanou <ant...@google.com>
                Cr-Commit-Position: refs/heads/main@{#1114453}

                To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: chromium/src
                Gerrit-Branch: main
                Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
                Gerrit-Change-Number: 4270994
                Gerrit-PatchSet: 31
                Gerrit-Owner: Anthi Orfanou <ant...@google.com>
                Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
                Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
                Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                Gerrit-Reviewer: Dominic Battré <bat...@chromium.org>
                Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
                Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
                Gerrit-MessageType: merged

                Nohemi Fernandez (Gerrit)

                unread,
                Mar 10, 2023, 8:14:24 AM3/10/23
                to Anthi Orfanou, Chromium LUCI CQ, chromium-a...@chromium.org, cros-teleme...@google.com, droger+w...@chromium.org, extension...@chromium.org, Dominic Battré, Alex Ilin, Tricium, chrome-family...@google.com, Tomek Jurkiewicz, chromium...@chromium.org

                View Change

                1 comment:

                • File components/supervised_user/core/browser/supervised_user_url_filter.cc:

                  • Patch Set #20, Line 157: variations::VariationsService* variations_service

                    Hi Nohemi, we have discussed this topic in 3P chat support with you and Tomek (February 20), where y […]

                    Closing as resolved to get country code inline when necessary.

                To view, visit change 4270994. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: chromium/src
                Gerrit-Branch: main
                Gerrit-Change-Id: I07ac5e2865586e43792d7fb944f098abcc3a26fa
                Gerrit-Change-Number: 4270994
                Gerrit-PatchSet: 31
                Gerrit-Owner: Anthi Orfanou <ant...@google.com>
                Gerrit-Reviewer: Alex Ilin <alex...@chromium.org>
                Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
                Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                Gerrit-Reviewer: Dominic Battré <bat...@chromium.org>
                Gerrit-Reviewer: Nohemi Fernandez <fern...@chromium.org>
                Gerrit-Reviewer: Tomek Jurkiewicz <t...@google.com>
                Gerrit-CC: gwsq
                Gerrit-Comment-Date: Fri, 10 Mar 2023 13:14:09 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Anthi Orfanou <ant...@google.com>
                Reply all
                Reply to author
                Forward
                0 new messages