Add cws ukm for enable and disable [chromium/src : main]

0 views
Skip to first unread message

Robert Kaplow (Gerrit)

unread,
Oct 30, 2025, 4:39:31 PM (6 days ago) Oct 30
to Howard Chang, Justin Lulejian, Devlin Cronin, Emilia Paz, AyeAye Python Dispatcher, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Devlin Cronin, Howard Chang and Justin Lulejian

Robert Kaplow added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Robert Kaplow . resolved

similar to other bug - can you link the approved privacy doc

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Howard Chang
  • Justin Lulejian
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
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: I1ea74d8348ff847c1ac821440fd86ae4d4aa80a1
Gerrit-Change-Number: 7040225
Gerrit-PatchSet: 9
Gerrit-Owner: Howard Chang <howa...@google.com>
Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
Gerrit-Reviewer: Howard Chang <howa...@google.com>
Gerrit-Reviewer: Justin Lulejian <jlul...@chromium.org>
Gerrit-Reviewer: Robert Kaplow <rka...@chromium.org>
Gerrit-CC: AyeAye Python Dispatcher <android-build-ayeay...@system.gserviceaccount.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Justin Lulejian <jlul...@chromium.org>
Gerrit-Attention: Howard Chang <howa...@google.com>
Gerrit-Comment-Date: Thu, 30 Oct 2025 20:39:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Howard Chang (Gerrit)

unread,
Oct 30, 2025, 4:40:54 PM (6 days ago) Oct 30
to Justin Lulejian, Devlin Cronin, Emilia Paz, Robert Kaplow, AyeAye Python Dispatcher, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Devlin Cronin, Justin Lulejian and Robert Kaplow

Howard Chang added 1 comment

Patchset-level comments
Robert Kaplow . resolved

similar to other bug - can you link the approved privacy doc

Howard Chang

Done, I have updated the linked bug.

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Justin Lulejian
  • Robert Kaplow
Gerrit-Attention: Robert Kaplow <rka...@chromium.org>
Gerrit-Comment-Date: Thu, 30 Oct 2025 20:40:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Robert Kaplow <rka...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Robert Kaplow (Gerrit)

unread,
Oct 31, 2025, 10:54:29 AM (5 days ago) Oct 31
to Howard Chang, Justin Lulejian, Devlin Cronin, Emilia Paz, AyeAye Python Dispatcher, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Howard Chang and Justin Lulejian

Robert Kaplow voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Howard Chang
  • Justin Lulejian
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    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: I1ea74d8348ff847c1ac821440fd86ae4d4aa80a1
    Gerrit-Change-Number: 7040225
    Gerrit-PatchSet: 9
    Gerrit-Owner: Howard Chang <howa...@google.com>
    Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
    Gerrit-Reviewer: Howard Chang <howa...@google.com>
    Gerrit-Reviewer: Justin Lulejian <jlul...@chromium.org>
    Gerrit-Reviewer: Robert Kaplow <rka...@chromium.org>
    Gerrit-CC: AyeAye Python Dispatcher <android-build-ayeay...@system.gserviceaccount.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Attention: Justin Lulejian <jlul...@chromium.org>
    Gerrit-Attention: Howard Chang <howa...@google.com>
    Gerrit-Comment-Date: Fri, 31 Oct 2025 14:54:20 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Justin Lulejian (Gerrit)

    unread,
    Oct 31, 2025, 3:01:31 PM (5 days ago) Oct 31
    to Howard Chang, Robert Kaplow, Devlin Cronin, Emilia Paz, AyeAye Python Dispatcher, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Emilia Paz, Howard Chang and Robert Kaplow

    Justin Lulejian voted and added 4 comments

    Votes added by Justin Lulejian

    Code-Review+1

    4 comments

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

    lgtm enums.xml, but adding back Emilia for the ExtensionRegistrar comment.

    Commit Message
    Line 7, Patchset 9:Add cws ukm for enable and disable
    Justin Lulejian . unresolved

    ```suggestion
    Add cws ukm for extension enable and disable
    ```

    File extensions/browser/BUILD.gn
    Line 635, Patchset 9: if (enable_rlz) {
    deps += [ "//rlz:rlz_lib" ]
    }
    Justin Lulejian . unresolved

    is this necessary for this CL?

    File extensions/browser/extension_registrar.cc
    Line 350, Patchset 9: RecordUkmForExtension(extension->url(), ExtensionUsageAction::kEnabled);
    Justin Lulejian . unresolved

    @emil...@chromium.org to double-check me here.

    Unfortunately, despite it being the most convenient, I don't think ExtensionRegistrar is the best place for recording this UMA. Non-UI actions like the sync service can enable/disable extension through this method/class so this UKM would record for those too. I believe the intent is just for user UI actions?

    If so I think the better location would be in the webUI code when we [set the extension to enabled or disabled as a result of a UI action](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resources/extensions/service.ts;l=221;drc=304cd9cdced1bdf31585d77e0c0b34dc90597462):

    This covers the known enable/disable UI surfaces (management chrome://extensions page and the detail page (chrome://extensions?id=...)).

    Unfortunately I don't see an existing [no UKM `chrome.metricsPrivate` call yet](https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/api/metrics_private/metrics_private_api.cc) so that would need to be created first in order to use it in this commit.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Emilia Paz
    • Howard Chang
    • Robert Kaplow
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      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: I1ea74d8348ff847c1ac821440fd86ae4d4aa80a1
      Gerrit-Change-Number: 7040225
      Gerrit-PatchSet: 12
      Gerrit-Owner: Howard Chang <howa...@google.com>
      Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
      Gerrit-Reviewer: Howard Chang <howa...@google.com>
      Gerrit-Reviewer: Justin Lulejian <jlul...@chromium.org>
      Gerrit-Reviewer: Robert Kaplow <rka...@chromium.org>
      Gerrit-CC: AyeAye Python Dispatcher <android-build-ayeay...@system.gserviceaccount.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Devlin Cronin <rdevlin...@chromium.org>
      Gerrit-Attention: Howard Chang <howa...@google.com>
      Gerrit-Attention: Robert Kaplow <rka...@chromium.org>
      Gerrit-Attention: Emilia Paz <emil...@chromium.org>
      Gerrit-Comment-Date: Fri, 31 Oct 2025 19:01:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Emilia Paz (Gerrit)

      unread,
      Oct 31, 2025, 3:59:10 PM (5 days ago) Oct 31
      to Howard Chang, Justin Lulejian, Robert Kaplow, Devlin Cronin, AyeAye Python Dispatcher, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
      Attention needed from Howard Chang and Robert Kaplow

      Emilia Paz added 3 comments

      Patchset-level comments
      Emilia Paz . resolved

      Thanks Howard!

      File chrome/browser/extensions/extension_action_runner.h
      Line 67, Patchset 12 (Latest): enum class ExtensionUsageAction {
      kPinned,
      kUnpinned,
      kContextMenuInit,
      kActionClicked,
      kEnabled,
      kDisabled,
      };
      Emilia Paz . unresolved

      From review in previous CL, it would be better to use the same enum for the UKM
      (changes here and in extension_context_menu_model.h, extension_registrar.h).

      File extensions/browser/extension_registrar.cc
      Line 350, Patchset 9: RecordUkmForExtension(extension->url(), ExtensionUsageAction::kEnabled);
      Justin Lulejian . unresolved

      @emil...@chromium.org to double-check me here.

      Unfortunately, despite it being the most convenient, I don't think ExtensionRegistrar is the best place for recording this UMA. Non-UI actions like the sync service can enable/disable extension through this method/class so this UKM would record for those too. I believe the intent is just for user UI actions?

      If so I think the better location would be in the webUI code when we [set the extension to enabled or disabled as a result of a UI action](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resources/extensions/service.ts;l=221;drc=304cd9cdced1bdf31585d77e0c0b34dc90597462):

      This covers the known enable/disable UI surfaces (management chrome://extensions page and the detail page (chrome://extensions?id=...)).

      Unfortunately I don't see an existing [no UKM `chrome.metricsPrivate` call yet](https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/api/metrics_private/metrics_private_api.cc) so that would need to be created first in order to use it in this commit.

      Emilia Paz

      If the goal is to track whether a user enabled or disables an extension, I agree with Justin that here is not the correct place. Manually enabling/disabling an extension can be done from:

      • user interaction on chrome://extensions or chrome://extensions/?id=<extension_id>
      • extension callschrome.management.setEnabled, which requires user interaction

      `ExtensionRegistrar::EnableExtension` is used by many places to enable the extension as a "side effect". For example if an extension is re installed and it was previously disabled ([code](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/extensions/webstore_standalone_installer.cc;l=214-218;drc=45a1118875a1b3a2a1ae9fee639cf1b546a43547)), or supervised account updates ([code](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/supervised_user/supervised_user_extensions_manager.cc;l=433-436;drc=45a1118875a1b3a2a1ae9fee639cf1b546a43547;bpv=1;bpt=1))

      If we want tor record every time extension is enabled/disabled for any reason, then yes this is correct. It would be noisy and hard to understand though

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Howard Chang
      • Robert Kaplow
      Gerrit-Comment-Date: Fri, 31 Oct 2025 19:58:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Justin Lulejian <jlul...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Robert Kaplow (Gerrit)

      unread,
      10:02 AM (2 hours ago) 10:02 AM
      to Howard Chang, Justin Lulejian, Devlin Cronin, AyeAye Python Dispatcher, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
      Attention needed from Howard Chang

      Robert Kaplow voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Howard Chang
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        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: I1ea74d8348ff847c1ac821440fd86ae4d4aa80a1
        Gerrit-Change-Number: 7040225
        Gerrit-PatchSet: 12
        Gerrit-Owner: Howard Chang <howa...@google.com>
        Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
        Gerrit-Reviewer: Howard Chang <howa...@google.com>
        Gerrit-Reviewer: Justin Lulejian <jlul...@chromium.org>
        Gerrit-Reviewer: Robert Kaplow <rka...@chromium.org>
        Gerrit-CC: AyeAye Python Dispatcher <android-build-ayeay...@system.gserviceaccount.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Devlin Cronin <rdevlin...@chromium.org>
        Gerrit-Attention: Howard Chang <howa...@google.com>
        Gerrit-Comment-Date: Wed, 05 Nov 2025 15:02:45 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages