[iOS] Track user background selection outcome and small refactoring [chromium/src : main]

0 views
Skip to first unread message

Robbie Gibson (Gerrit)

unread,
Sep 18, 2025, 5:29:59 PM (2 days ago) Sep 18
to Cheick Cisse, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Cheick Cisse

Robbie Gibson voted and added 2 comments

Votes added by Robbie Gibson

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Robbie Gibson . resolved

lgtm

File ios/chrome/browser/home_customization/coordinator/home_customization_background_configuration_mediator.mm
Line 192, Patchset 1 (Latest): self.backgroundSelectionOutcome = BackgroundSelectionOutcome::kApplied;
Robbie Gibson . unresolved

This will also be set if the user selects a recently used background and then dismisses the menu. I think that's fine? But just wanted to confirm.

Open in Gerrit

Related details

Attention is currently required from:
  • Cheick Cisse
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
Gerrit-Change-Number: 6967388
Gerrit-PatchSet: 1
Gerrit-Owner: Cheick Cisse <cheic...@google.com>
Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
Gerrit-Attention: Cheick Cisse <cheic...@google.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 21:29:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Cheick Cisse (Gerrit)

unread,
Sep 18, 2025, 5:42:53 PM (2 days ago) Sep 18
to Robbie Gibson, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org

Cheick Cisse added 1 comment

File ios/chrome/browser/home_customization/coordinator/home_customization_background_configuration_mediator.mm
Line 192, Patchset 1 (Latest): self.backgroundSelectionOutcome = BackgroundSelectionOutcome::kApplied;
Robbie Gibson . resolved

This will also be set if the user selects a recently used background and then dismisses the menu. I think that's fine? But just wanted to confirm.

Cheick Cisse

I think so? It would be selection applied.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
Gerrit-Change-Number: 6967388
Gerrit-PatchSet: 1
Gerrit-Owner: Cheick Cisse <cheic...@google.com>
Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 21:42:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Robbie Gibson <rkgi...@google.com>
satisfied_requirement
open
diffy

Robbie Gibson (Gerrit)

unread,
Sep 19, 2025, 5:14:52 PM (17 hours ago) Sep 19
to Cheick Cisse, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Cheick Cisse

Robbie Gibson added 3 comments

Commit Message
Line 21, Patchset 4 (Latest):HomeCustomizationBackgroundPickerActionSheetSoordinator because
Robbie Gibson . unresolved

nit spelling "Soordinator"

Line 22, Patchset 4 (Latest):HomeCustomizationBackgroundPhotoPickerCoordinator updates
Robbie Gibson . unresolved

I'm a little confused here. I think the photo framing flow doesn't use the `HomeCustomizationBackgroundConfigurationMediator` at all, just the `HomeCustomizationBackgroundPhotoFramingMediator`, so would it be easier to track the photo flow stuff there?

File ios/chrome/browser/home_customization/coordinator/home_customization_background_picker_action_sheet_coordinator.mm
Line 182, Patchset 4 (Latest): BackgroundSelectionOutcome::kCanceledAfterSelection;
Robbie Gibson . unresolved

Here, for example, `kCanceledAfterSelection` has a slightly different meaning for the photo flow vs color or gallery flows, right?

For the photo flow here, it means the user chose a photo from their library, but then cancelled. Vs color or gallery where they did select a color/image, saw how it looked on the background and then cancelled.

I guess in some sense they're similar, although to me it feels slightly different.

Open in Gerrit

Related details

Attention is currently required from:
  • Cheick Cisse
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
    Gerrit-Change-Number: 6967388
    Gerrit-PatchSet: 4
    Gerrit-Owner: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
    Gerrit-Attention: Cheick Cisse <cheic...@google.com>
    Gerrit-Comment-Date: Fri, 19 Sep 2025 21:14:43 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Cheick Cisse (Gerrit)

    unread,
    Sep 19, 2025, 5:25:42 PM (17 hours ago) Sep 19
    to Robbie Gibson, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Robbie Gibson

    Cheick Cisse added 2 comments

    Commit Message
    Line 22, Patchset 4 (Latest):HomeCustomizationBackgroundPhotoPickerCoordinator updates
    Robbie Gibson . unresolved

    I'm a little confused here. I think the photo framing flow doesn't use the `HomeCustomizationBackgroundConfigurationMediator` at all, just the `HomeCustomizationBackgroundPhotoFramingMediator`, so would it be easier to track the photo flow stuff there?

    Cheick Cisse

    Yeah it's a bit confusing I agree. The photo framing actually does interclty interact with HomeCustomizationBackgroundConfigurationMediator. HomeCustomizationBackgroundPhotoFramingMediator -> discardBackground -> _backgroundService->RestoreCurrentTheme(); -> which calls [1] (1: HomeCustomizationBackgroundConfigurationMediator from HomeCustomizationCoordinator) and also (2: HomeCustomizationBackgroundConfigurationMediator from HomeCustomizationBackgroundPickerActionSheetCoordinator). So we know if themeHasChanged is true or false. With this value, we also know if the user outcome is kCanceledAfterSelection, kCanceled, or kApplied.

    [1] https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/browser/home_customization/coordinator/home_customization_background_configuration_mediator.mm;l=354?q=HomeCustomizationBackgroundConfigurationMediator&ss=chromium%2Fchromium%2Fsrc

    File ios/chrome/browser/home_customization/coordinator/home_customization_background_picker_action_sheet_coordinator.mm
    Line 182, Patchset 4 (Latest): BackgroundSelectionOutcome::kCanceledAfterSelection;
    Robbie Gibson . unresolved

    Here, for example, `kCanceledAfterSelection` has a slightly different meaning for the photo flow vs color or gallery flows, right?

    For the photo flow here, it means the user chose a photo from their library, but then cancelled. Vs color or gallery where they did select a color/image, saw how it looked on the background and then cancelled.

    I guess in some sense they're similar, although to me it feels slightly different.

    Cheick Cisse

    Yeah I see what you mean but yeah to me it's very similar. The user selected something (color, preset image or own image) and then canceled or applied or the user just canceled. Maybe we could change the name of enums? I think have all of theme with the same enum makes sense to me. Unless you feel strongly and in that case I can make another enum specifically for user uploaded images.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Robbie Gibson
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
    Gerrit-Change-Number: 6967388
    Gerrit-PatchSet: 4
    Gerrit-Owner: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
    Gerrit-Attention: Robbie Gibson <rkgi...@google.com>
    Gerrit-Comment-Date: Fri, 19 Sep 2025 21:25:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Robbie Gibson <rkgi...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robbie Gibson (Gerrit)

    unread,
    Sep 19, 2025, 5:30:14 PM (17 hours ago) Sep 19
    to Cheick Cisse, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Cheick Cisse

    Robbie Gibson added 2 comments

    Commit Message
    Line 22, Patchset 4 (Latest):HomeCustomizationBackgroundPhotoPickerCoordinator updates
    Robbie Gibson . resolved

    I'm a little confused here. I think the photo framing flow doesn't use the `HomeCustomizationBackgroundConfigurationMediator` at all, just the `HomeCustomizationBackgroundPhotoFramingMediator`, so would it be easier to track the photo flow stuff there?

    Cheick Cisse

    Yeah it's a bit confusing I agree. The photo framing actually does interclty interact with HomeCustomizationBackgroundConfigurationMediator. HomeCustomizationBackgroundPhotoFramingMediator -> discardBackground -> _backgroundService->RestoreCurrentTheme(); -> which calls [1] (1: HomeCustomizationBackgroundConfigurationMediator from HomeCustomizationCoordinator) and also (2: HomeCustomizationBackgroundConfigurationMediator from HomeCustomizationBackgroundPickerActionSheetCoordinator). So we know if themeHasChanged is true or false. With this value, we also know if the user outcome is kCanceledAfterSelection, kCanceled, or kApplied.

    [1] https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/browser/home_customization/coordinator/home_customization_background_configuration_mediator.mm;l=354?q=HomeCustomizationBackgroundConfigurationMediator&ss=chromium%2Fchromium%2Fsrc

    Robbie Gibson

    Ah yeah, that's true, although tbh I'm not 100% sure if it's good that the 2 `HomeCustomizationBackgroundConfigurationMediator` are constantly observing the service (this is also what caused the earlier issue where both `HomeCustomizationBackgroundConfigurationMediator` see that the background has changed when you pick a color/gallery option).

    But I don't really have a very well-thought-out replacement idea, so I guess it's fine for now.

    File ios/chrome/browser/home_customization/coordinator/home_customization_background_picker_action_sheet_coordinator.mm
    Line 182, Patchset 4 (Latest): BackgroundSelectionOutcome::kCanceledAfterSelection;
    Robbie Gibson . resolved

    Here, for example, `kCanceledAfterSelection` has a slightly different meaning for the photo flow vs color or gallery flows, right?

    For the photo flow here, it means the user chose a photo from their library, but then cancelled. Vs color or gallery where they did select a color/image, saw how it looked on the background and then cancelled.

    I guess in some sense they're similar, although to me it feels slightly different.

    Cheick Cisse

    Yeah I see what you mean but yeah to me it's very similar. The user selected something (color, preset image or own image) and then canceled or applied or the user just canceled. Maybe we could change the name of enums? I think have all of theme with the same enum makes sense to me. Unless you feel strongly and in that case I can make another enum specifically for user uploaded images.

    Robbie Gibson

    Yeah, I guess that it's close enough to let us reuse the same enum.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Cheick Cisse
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
    Gerrit-Change-Number: 6967388
    Gerrit-PatchSet: 4
    Gerrit-Owner: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
    Gerrit-Attention: Cheick Cisse <cheic...@google.com>
    Gerrit-Comment-Date: Fri, 19 Sep 2025 21:30:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Robbie Gibson <rkgi...@google.com>
    Comment-In-Reply-To: Cheick Cisse <cheic...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Cheick Cisse (Gerrit)

    unread,
    Sep 19, 2025, 5:36:02 PM (17 hours ago) Sep 19
    to Robbie Gibson, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Robbie Gibson

    Cheick Cisse added 1 comment

    Commit Message
    Line 21, Patchset 4:HomeCustomizationBackgroundPickerActionSheetSoordinator because
    Robbie Gibson . resolved

    nit spelling "Soordinator"

    Cheick Cisse

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Robbie Gibson
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
    Gerrit-Change-Number: 6967388
    Gerrit-PatchSet: 5
    Gerrit-Owner: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
    Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
    Gerrit-Attention: Robbie Gibson <rkgi...@google.com>
    Gerrit-Comment-Date: Fri, 19 Sep 2025 21:35:58 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robbie Gibson (Gerrit)

    unread,
    Sep 19, 2025, 6:14:07 PM (16 hours ago) Sep 19
    to Cheick Cisse, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Cheick Cisse

    Robbie Gibson voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Cheick Cisse
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
      Gerrit-Change-Number: 6967388
      Gerrit-PatchSet: 5
      Gerrit-Owner: Cheick Cisse <cheic...@google.com>
      Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
      Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
      Gerrit-Attention: Cheick Cisse <cheic...@google.com>
      Gerrit-Comment-Date: Fri, 19 Sep 2025 22:13:57 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Cheick Cisse (Gerrit)

      unread,
      Sep 19, 2025, 6:52:18 PM (16 hours ago) Sep 19
      to Robbie Gibson, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org

      Cheick Cisse 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
      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: Id766db0bba83f47e8eeea05abfbeea8d285892f8
      Gerrit-Change-Number: 6967388
      Gerrit-PatchSet: 5
      Gerrit-Owner: Cheick Cisse <cheic...@google.com>
      Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
      Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
      Gerrit-Comment-Date: Fri, 19 Sep 2025 22:52:12 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Sep 19, 2025, 6:55:05 PM (16 hours ago) Sep 19
      to Cheick Cisse, Robbie Gibson, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [iOS] Track user background selection outcome and small refactoring

      This CL tracks the user's background selection outcome, which can be one
      of the following:
      - Selection applied
      - Selection canceled
      - No selection
      This will be used for metrics.

      In addition, this CL removes the call to SaveCurrentTheme, as this is already
      handled in the HomeCustomizationCoordinator.

      For user uploaded images, we have to set the backgroundSelectionOutcome
      of the mediator in the
      HomeCustomizationBackgroundPickerActionSheetCoordinator because
      HomeCustomizationBackgroundPhotoPickerCoordinator updates
      a different mediator. They are both
      HomeCustomizationBackgroundConfigurationMediator but two different
      objects.
      Bug: 445990189
      Change-Id: Id766db0bba83f47e8eeea05abfbeea8d285892f8
      Commit-Queue: Cheick Cisse <cheic...@google.com>
      Reviewed-by: Robbie Gibson <rkgi...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1518219}
      Files:
      Change size: M
      Delta: 4 files changed, 50 insertions(+), 8 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Robbie Gibson
      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: Id766db0bba83f47e8eeea05abfbeea8d285892f8
      Gerrit-Change-Number: 6967388
      Gerrit-PatchSet: 6
      Gerrit-Owner: Cheick Cisse <cheic...@google.com>
      Gerrit-Reviewer: Cheick Cisse <cheic...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Robbie Gibson <rkgi...@google.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages