Extend ContextualCueingService with per-target UCB stats tracking [chromium/src : main]

0 views
Skip to first unread message

Ian Wells (Gerrit)

unread,
Jun 16, 2026, 4:26:51 PM (11 days ago) Jun 16
to Benedict Wong, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
Attention needed from Benedict Wong

Ian Wells added 4 comments

File chrome/browser/contextual_cueing/contextual_cueing_service.cc
Line 24, Patchset 17 (Latest): CueTargetType type = static_cast<CueTargetType>(i);
TargetStats stats;
stats.impressions =
pref_service_->GetInteger(prefs::GetImpressionsPrefName(type));
stats.clicks = pref_service_->GetInteger(prefs::GetClicksPrefName(type));
stats.dismissals =
pref_service_->GetInteger(prefs::GetDismissalsPrefName(type));
Ian Wells . unresolved

Nit, I'd slightly like to see this move to a helper in prefs.cc, something like GetTargetStatsFromPrefs(pref_service_, type)

Line 52, Patchset 17 (Latest): pref_service_->SetInteger(prefs::GetImpressionsPrefName(type),
stats.impressions);
pref_service_->SetInteger(prefs::GetClicksPrefName(type), stats.clicks);
pref_service_->SetInteger(prefs::GetDismissalsPrefName(type),
stats.dismissals);
Ian Wells . unresolved

Same nit as above, can you please put this in a helper in prefs.cc?

File chrome/browser/contextual_cueing/prefs.cc
Line 18, Patchset 17 (Latest): return std::string("contextual_cueing.ucb.") +
base::ToLowerASCII(GetName(type)) + ".";
Ian Wells . unresolved

Nit, consider base::StrCat here

Line 41, Patchset 17 (Latest): registry->RegisterIntegerPref(GetImpressionsPrefName(type), 0);
registry->RegisterIntegerPref(GetClicksPrefName(type), 0);
registry->RegisterIntegerPref(GetDismissalsPrefName(type), 0);
Ian Wells . unresolved

optional: instead of individually registering each of these pref paths for each CueTargetType, you could store all of it in a base::DictValue like this:

```
pref contextual_cueing.ucb = base::DictValue {
glic = base::DictValue {
impressions = 0,
clicks = 0,
dismissals = 0,
},
...
}
```

Up to you since while it does make registration simpler, it would make reading and writing more complicated.

Open in Gerrit

Related details

Attention is currently required from:
  • Benedict Wong
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
Gerrit-Change-Number: 7945087
Gerrit-PatchSet: 17
Gerrit-Owner: Benedict Wong <benedi...@google.com>
Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
Gerrit-Attention: Benedict Wong <benedi...@google.com>
Gerrit-Comment-Date: Tue, 16 Jun 2026 20:26:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ian Wells (Gerrit)

unread,
Jun 16, 2026, 4:27:01 PM (11 days ago) Jun 16
to Benedict Wong, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
Attention needed from Benedict Wong

Ian Wells voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Benedict Wong
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
Gerrit-Change-Number: 7945087
Gerrit-PatchSet: 17
Gerrit-Owner: Benedict Wong <benedi...@google.com>
Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
Gerrit-Attention: Benedict Wong <benedi...@google.com>
Gerrit-Comment-Date: Tue, 16 Jun 2026 20:26:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Benedict Wong (Gerrit)

unread,
Jun 16, 2026, 7:21:44 PM (11 days ago) Jun 16
to Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
Attention needed from Ian Wells

Benedict Wong added 4 comments

File chrome/browser/contextual_cueing/contextual_cueing_service.cc
Line 24, Patchset 17: CueTargetType type = static_cast<CueTargetType>(i);

TargetStats stats;
stats.impressions =
pref_service_->GetInteger(prefs::GetImpressionsPrefName(type));
stats.clicks = pref_service_->GetInteger(prefs::GetClicksPrefName(type));
stats.dismissals =
pref_service_->GetInteger(prefs::GetDismissalsPrefName(type));
Ian Wells . resolved

Nit, I'd slightly like to see this move to a helper in prefs.cc, something like GetTargetStatsFromPrefs(pref_service_, type)

Benedict Wong

Done

Line 52, Patchset 17: pref_service_->SetInteger(prefs::GetImpressionsPrefName(type),

stats.impressions);
pref_service_->SetInteger(prefs::GetClicksPrefName(type), stats.clicks);
pref_service_->SetInteger(prefs::GetDismissalsPrefName(type),
stats.dismissals);
Ian Wells . resolved

Same nit as above, can you please put this in a helper in prefs.cc?

Benedict Wong

Done

File chrome/browser/contextual_cueing/prefs.cc
Line 18, Patchset 17: return std::string("contextual_cueing.ucb.") +
base::ToLowerASCII(GetName(type)) + ".";
Ian Wells . resolved

Nit, consider base::StrCat here

Benedict Wong

Done

Line 41, Patchset 17: registry->RegisterIntegerPref(GetImpressionsPrefName(type), 0);

registry->RegisterIntegerPref(GetClicksPrefName(type), 0);
registry->RegisterIntegerPref(GetDismissalsPrefName(type), 0);
Ian Wells . resolved

optional: instead of individually registering each of these pref paths for each CueTargetType, you could store all of it in a base::DictValue like this:

```
pref contextual_cueing.ucb = base::DictValue {
glic = base::DictValue {
impressions = 0,
clicks = 0,
dismissals = 0,
},
...
}
```

Up to you since while it does make registration simpler, it would make reading and writing more complicated.

Benedict Wong

Omitted; Flat preferences are probably easier to update and increment individually

Open in Gerrit

Related details

Attention is currently required from:
  • Ian Wells
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
    Gerrit-Change-Number: 7945087
    Gerrit-PatchSet: 19
    Gerrit-Attention: Ian Wells <iwe...@chromium.org>
    Gerrit-Comment-Date: Tue, 16 Jun 2026 23:21:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Ian Wells <iwe...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Sophie Chang (Gerrit)

    unread,
    Jun 17, 2026, 2:32:08 AM (11 days ago) Jun 17
    to Benedict Wong, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
    Attention needed from Benedict Wong and Ian Wells

    Sophie Chang added 5 comments

    File chrome/browser/contextual_cueing/BUILD.gn
    Line 18, Patchset 20 (Latest): "ucb_scorer.h",
    Sophie Chang . unresolved

    i think this can be in impl

    File chrome/browser/contextual_cueing/contextual_cueing_service.h
    Line 94, Patchset 20 (Latest): SEQUENCE_CHECKER(sequence_checker_);
    Sophie Chang . unresolved

    i think we generally want sequence checker to be the last thing to get destructed

    Line 89, Patchset 20 (Latest): static const TargetStats kEmptyStats;
    Sophie Chang . unresolved

    i think you just need the ucb scorer for this - can you forward declare

    or maybe make as an internal var

    File chrome/browser/contextual_cueing/contextual_cueing_service_factory.cc
    Line 59, Patchset 20 (Latest):void ContextualCueingServiceFactory::RegisterProfilePrefs(
    Sophie Chang . unresolved

    why here?

    should just register in browser_prefs.cc

    File chrome/browser/contextual_cueing/prefs.h
    Line 23, Patchset 20 (Latest):namespace prefs {
    Sophie Chang . unresolved

    would just have RegisterProfilePrefs be here instead of the factory - consistent with other classes

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benedict Wong
    • Ian Wells
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
      Gerrit-Change-Number: 7945087
      Gerrit-PatchSet: 20
      Gerrit-Owner: Benedict Wong <benedi...@google.com>
      Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
      Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
      Gerrit-Attention: Benedict Wong <benedi...@google.com>
      Gerrit-Attention: Ian Wells <iwe...@chromium.org>
      Gerrit-Comment-Date: Wed, 17 Jun 2026 06:31:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Benedict Wong (Gerrit)

      unread,
      Jun 17, 2026, 4:34:43 PM (10 days ago) Jun 17
      to Sophie Chang, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
      Attention needed from Ian Wells and Sophie Chang

      Benedict Wong added 5 comments

      File chrome/browser/contextual_cueing/BUILD.gn
      Line 18, Patchset 20: "ucb_scorer.h",
      Sophie Chang . resolved

      i think this can be in impl

      Benedict Wong

      Done

      File chrome/browser/contextual_cueing/contextual_cueing_service.h
      Line 94, Patchset 20: SEQUENCE_CHECKER(sequence_checker_);
      Sophie Chang . resolved

      i think we generally want sequence checker to be the last thing to get destructed

      Benedict Wong

      Done

      Line 89, Patchset 20: static const TargetStats kEmptyStats;
      Sophie Chang . resolved

      i think you just need the ucb scorer for this - can you forward declare

      or maybe make as an internal var

      Benedict Wong

      Done; made internal

      File chrome/browser/contextual_cueing/contextual_cueing_service_factory.cc
      Line 59, Patchset 20:void ContextualCueingServiceFactory::RegisterProfilePrefs(
      Sophie Chang . resolved

      why here?

      should just register in browser_prefs.cc

      Benedict Wong

      Done, i think

      File chrome/browser/contextual_cueing/prefs.h
      Line 23, Patchset 20:namespace prefs {
      Sophie Chang . resolved

      would just have RegisterProfilePrefs be here instead of the factory - consistent with other classes

      Benedict Wong

      Done, i think

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Wells
      • Sophie Chang
      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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
      Gerrit-Change-Number: 7945087
      Gerrit-PatchSet: 24
      Gerrit-Owner: Benedict Wong <benedi...@google.com>
      Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
      Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
      Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
      Gerrit-Attention: Ian Wells <iwe...@chromium.org>
      Gerrit-Comment-Date: Wed, 17 Jun 2026 20:34:34 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Sophie Chang <sophi...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sophie Chang (Gerrit)

      unread,
      Jun 18, 2026, 2:06:55 AM (10 days ago) Jun 18
      to Benedict Wong, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
      Attention needed from Benedict Wong and Ian Wells

      Sophie Chang added 7 comments

      File chrome/browser/contextual_cueing/contextual_cueing_service.h
      Line 90, Patchset 24 (Latest): const raw_ptr<PrefService> pref_service_;
      Sophie Chang . unresolved

      can you specify that these are the profile prefs specifically - there are also prefs on the install level (local state) - and we should just be more specific here to avoid making mistakes

      Line 18, Patchset 24 (Latest):#include "components/prefs/pref_service.h"
      Sophie Chang . unresolved

      fwd declare prefservice

      File chrome/browser/contextual_cueing/contextual_cueing_service.cc
      Line 25, Patchset 24 (Latest): if (!pref_service_) {
      Sophie Chang . unresolved

      when is pref service null? i think its always available?

      File chrome/browser/contextual_cueing/contextual_cueing_service_unittest.cc
      Line 27, Patchset 24 (Latest): std::make_unique<ContextualCueingService>(/*pref_service=*/nullptr);
      Sophie Chang . unresolved

      why not just test the prefs get persisted?

      Line 149, Patchset 24 (Latest):class ContextualCueingServicePrefTest : public testing::Test {
      Sophie Chang . unresolved

      why not just have this be the default behavior?

      i dont think it makes sense to really have anything be truly ephemeral for session?

      File chrome/browser/contextual_cueing/prefs.h
      Line 11, Patchset 24 (Latest):#include "chrome/browser/contextual_cueing/ucb_scorer.h"
      Sophie Chang . unresolved

      is this import still needed?

      File chrome/browser/prefs/browser_prefs.cc
      Line 1686, Patchset 24 (Latest): contextual_cueing::prefs::RegisterProfilePrefs(registry);
      Sophie Chang . unresolved

      alphabetize - this should be right above 1685

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Benedict Wong
      • Ian Wells
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
        Gerrit-Change-Number: 7945087
        Gerrit-PatchSet: 24
        Gerrit-Owner: Benedict Wong <benedi...@google.com>
        Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
        Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
        Gerrit-Attention: Benedict Wong <benedi...@google.com>
        Gerrit-Attention: Ian Wells <iwe...@chromium.org>
        Gerrit-Comment-Date: Thu, 18 Jun 2026 06:06:27 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Benedict Wong (Gerrit)

        unread,
        Jun 18, 2026, 2:36:23 PM (9 days ago) Jun 18
        to Sophie Chang, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
        Attention needed from Ian Wells and Sophie Chang

        Benedict Wong added 7 comments

        File chrome/browser/contextual_cueing/contextual_cueing_service.h
        Line 90, Patchset 24: const raw_ptr<PrefService> pref_service_;
        Sophie Chang . resolved

        can you specify that these are the profile prefs specifically - there are also prefs on the install level (local state) - and we should just be more specific here to avoid making mistakes

        Benedict Wong

        Done

        Line 18, Patchset 24:#include "components/prefs/pref_service.h"
        Sophie Chang . resolved

        fwd declare prefservice

        Benedict Wong

        Done. Do i forward declare instead of import for basically any non-coupled service?

        File chrome/browser/contextual_cueing/contextual_cueing_service.cc
        Line 25, Patchset 24: if (!pref_service_) {
        Sophie Chang . resolved

        when is pref service null? i think its always available?

        Benedict Wong

        Done. default defensive.

        File chrome/browser/contextual_cueing/contextual_cueing_service_unittest.cc
        Line 27, Patchset 24: std::make_unique<ContextualCueingService>(/*pref_service=*/nullptr);
        Sophie Chang . resolved

        why not just test the prefs get persisted?

        Benedict Wong

        Done

        Line 149, Patchset 24:class ContextualCueingServicePrefTest : public testing::Test {
        Sophie Chang . resolved

        why not just have this be the default behavior?

        i dont think it makes sense to really have anything be truly ephemeral for session?

        Benedict Wong

        Done

        File chrome/browser/contextual_cueing/prefs.h
        Line 11, Patchset 24:#include "chrome/browser/contextual_cueing/ucb_scorer.h"
        Sophie Chang . resolved

        is this import still needed?

        Benedict Wong

        Done

        File chrome/browser/prefs/browser_prefs.cc
        Line 1686, Patchset 24: contextual_cueing::prefs::RegisterProfilePrefs(registry);
        Sophie Chang . resolved

        alphabetize - this should be right above 1685

        Benedict Wong

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ian Wells
        • Sophie Chang
        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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
          Gerrit-Change-Number: 7945087
          Gerrit-PatchSet: 26
          Gerrit-Owner: Benedict Wong <benedi...@google.com>
          Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
          Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
          Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
          Gerrit-Attention: Ian Wells <iwe...@chromium.org>
          Gerrit-Comment-Date: Thu, 18 Jun 2026 18:36:03 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Sophie Chang <sophi...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sophie Chang (Gerrit)

          unread,
          Jun 18, 2026, 2:44:41 PM (9 days ago) Jun 18
          to Benedict Wong, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
          Attention needed from Benedict Wong and Ian Wells

          Sophie Chang voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Benedict Wong
          • Ian Wells
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
          Gerrit-Change-Number: 7945087
          Gerrit-PatchSet: 26
          Gerrit-Owner: Benedict Wong <benedi...@google.com>
          Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
          Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
          Gerrit-Attention: Benedict Wong <benedi...@google.com>
          Gerrit-Attention: Ian Wells <iwe...@chromium.org>
          Gerrit-Comment-Date: Thu, 18 Jun 2026 18:44:24 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ian Wells (Gerrit)

          unread,
          Jun 18, 2026, 5:56:40 PM (9 days ago) Jun 18
          to Benedict Wong, Sophie Chang, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
          Attention needed from Benedict Wong and Sophie Chang

          Ian Wells voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Benedict Wong
          • Sophie Chang
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
          Gerrit-Change-Number: 7945087
          Gerrit-PatchSet: 28
          Gerrit-Owner: Benedict Wong <benedi...@google.com>
          Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
          Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
          Gerrit-Attention: Benedict Wong <benedi...@google.com>
          Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
          Gerrit-Comment-Date: Thu, 18 Jun 2026 21:56:25 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sophie Chang (Gerrit)

          unread,
          Jun 18, 2026, 7:32:52 PM (9 days ago) Jun 18
          to Benedict Wong, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
          Attention needed from Benedict Wong

          Sophie Chang voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Benedict Wong
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
            Gerrit-Change-Number: 7945087
            Gerrit-PatchSet: 28
            Gerrit-Owner: Benedict Wong <benedi...@google.com>
            Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
            Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
            Gerrit-Attention: Benedict Wong <benedi...@google.com>
            Gerrit-Comment-Date: Thu, 18 Jun 2026 23:32:33 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Benedict Wong (Gerrit)

            unread,
            Jun 22, 2026, 4:14:55 AM (5 days ago) Jun 22
            to Sophie Chang, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org

            Benedict Wong voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
            Gerrit-Change-Number: 7945087
            Gerrit-PatchSet: 28
            Gerrit-Owner: Benedict Wong <benedi...@google.com>
            Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
            Gerrit-Comment-Date: Mon, 22 Jun 2026 08:14:37 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Benedict Wong (Gerrit)

            unread,
            Jun 22, 2026, 5:40:42 AM (5 days ago) Jun 22
            to Chromium LUCI CQ, Sophie Chang, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
            Attention needed from Ian Wells and Sophie Chang

            Benedict Wong voted and added 1 comment

            Votes added by Benedict Wong

            Auto-Submit+1

            1 comment

            Patchset-level comments
            File-level comment, Patchset 29 (Latest):
            Benedict Wong . resolved

            Fixed a test failure

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ian Wells
            • Sophie Chang
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
              Gerrit-Change-Number: 7945087
              Gerrit-PatchSet: 29
              Gerrit-Owner: Benedict Wong <benedi...@google.com>
              Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
              Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
              Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
              Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
              Gerrit-Attention: Ian Wells <iwe...@chromium.org>
              Gerrit-Comment-Date: Mon, 22 Jun 2026 09:40:30 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Sophie Chang (Gerrit)

              unread,
              Jun 22, 2026, 12:33:25 PM (5 days ago) Jun 22
              to Benedict Wong, Chromium LUCI CQ, Ian Wells, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
              Attention needed from Benedict Wong and Ian Wells

              Sophie Chang voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Benedict Wong
              • Ian Wells
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
                Gerrit-Change-Number: 7945087
                Gerrit-PatchSet: 29
                Gerrit-Owner: Benedict Wong <benedi...@google.com>
                Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
                Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
                Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
                Gerrit-Attention: Benedict Wong <benedi...@google.com>
                Gerrit-Attention: Ian Wells <iwe...@chromium.org>
                Gerrit-Comment-Date: Mon, 22 Jun 2026 16:32:13 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Ian Wells (Gerrit)

                unread,
                Jun 22, 2026, 2:12:29 PM (5 days ago) Jun 22
                to Benedict Wong, Sophie Chang, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org
                Attention needed from Benedict Wong

                Ian Wells voted

                Code-Review+1
                Commit-Queue+2
                Open in Gerrit

                Related details

                Attention is currently required from:
                • Benedict Wong
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement satisfiedCode-Owners
                  • requirement 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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
                  Gerrit-Change-Number: 7945087
                  Gerrit-PatchSet: 29
                  Gerrit-Owner: Benedict Wong <benedi...@google.com>
                  Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
                  Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
                  Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
                  Gerrit-Attention: Benedict Wong <benedi...@google.com>
                  Gerrit-Comment-Date: Mon, 22 Jun 2026 18:12:08 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Chromium LUCI CQ (Gerrit)

                  unread,
                  Jun 22, 2026, 3:31:53 PM (5 days ago) Jun 22
                  to Benedict Wong, Ian Wells, Sophie Chang, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, dewitt...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org

                  Chromium LUCI CQ submitted the change

                  Change information

                  Commit message:
                  Extend ContextualCueingService with per-target UCB stats tracking

                  Add per-target TargetStats tracking to ContextualCueingService to
                  support UCB scorer ranking in the upcoming V2 multi-source orchestration
                  path.

                  Changes:
                  - OnCueShown now takes a CueTargetType parameter to associate each
                  impression with the target that triggered it.
                  - OnCueClicked and OnCueDismissed now update per-target click/dismissal
                  counters in addition to the existing global backoff state.
                  - Persist per-target stats (impressions, clicks, dismissals) across browser
                  restarts using Profile Prefs (prefs.h/cc), ensuring UCB scoring carries
                  historical signal across sessions.
                  - Add dismiss_count_ = 0; to OnCueClicked to correctly reset the global
                  dismissal backoff multiplier when a cue is clicked, fulfilling the existing
                  header documentation requirement (which was missing in the V1 implementation).
                  - GetStatsForTarget(type): returns the TargetStats for a given target,
                  used by the UCB scorer to compute exploit/explore scores.
                  - GetTotalImpressions(): sums impressions across all targets, used as
                  the global n_total for the UCB exploration bonus.
                  - Move ucb_scorer.h to the public :contextual_cueing target so it can
                  be included from the public service header without gn check failures.

                  TAG=agy
                  Bug: 520159219
                  Change-Id: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
                  Reviewed-by: Sophie Chang <sophi...@chromium.org>
                  Reviewed-by: Ian Wells <iwe...@chromium.org>
                  Commit-Queue: Ian Wells <iwe...@chromium.org>
                  Auto-Submit: Benedict Wong <benedi...@google.com>
                  Cr-Commit-Position: refs/heads/main@{#1650496}
                  Files:
                  • M chrome/browser/contextual_cueing/BUILD.gn
                  • M chrome/browser/contextual_cueing/contextual_cueing_controller.cc
                  • M chrome/browser/contextual_cueing/contextual_cueing_service.cc
                  • M chrome/browser/contextual_cueing/contextual_cueing_service.h
                  • M chrome/browser/contextual_cueing/contextual_cueing_service_factory.cc
                  • M chrome/browser/contextual_cueing/contextual_cueing_service_unittest.cc
                  • M chrome/browser/contextual_cueing/cue_target.h
                  • A chrome/browser/contextual_cueing/prefs.cc
                  • M chrome/browser/contextual_cueing/prefs.h
                  • M chrome/browser/contextual_cueing/ucb_scorer.h
                  • M chrome/browser/prefs/browser_prefs.cc
                  Change size: L
                  Delta: 11 files changed, 314 insertions(+), 22 deletions(-)
                  Branch: refs/heads/main
                  Submit Requirements:
                  • requirement satisfiedCode-Review: +1 by Sophie Chang, +1 by Ian Wells
                  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: I80cc41e1a0e1d573ff57ed0943a95bbf378e9643
                  Gerrit-Change-Number: 7945087
                  Gerrit-PatchSet: 30
                  Gerrit-Owner: Benedict Wong <benedi...@google.com>
                  Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
                  Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                  Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
                  Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
                  open
                  diffy
                  satisfied_requirement
                  Reply all
                  Reply to author
                  Forward
                  0 new messages