[iOS] Sign in flow for 'SaveToPhotos' [chromium/src : main]

0 views
Skip to first unread message

Quentin Pubert (Gerrit)

unread,
Apr 30, 2026, 8:55:58 AM (5 days ago) Apr 30
to Joseph Lanza, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Joseph Lanza

Quentin Pubert added 6 comments

File ios/chrome/app/strings/ios_strings.grd
Line 7486, Patchset 2 (Latest): Save photos in your Google Photos and access them any time.
Quentin Pubert . unresolved

We might want a different string here since there is no such thing as Choose from Photos so it is not accurate to say "access them any time"

File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_coordinator.mm
Line 395, Patchset 2 (Latest): if (_signinCoordinator.viewWillPersist) {
Quentin Pubert . unresolved
```suggestion
CHECK(base::FeatureList::IsEnabled(kIOSSaveToPhotosSignedOut));
if (_signinCoordinator.viewWillPersist) {
```
Line 427, Patchset 2 (Latest): [self startValidationSpinnerForAccountPicker];
[self hideAccountPicker];
Quentin Pubert . unresolved

If I am not mistaken the account picker is not presented at this point so none of this is doing anything.

Line 430, Patchset 2 (Latest): [_mediator tryUploadImage];
Quentin Pubert . unresolved

Instead of adding `-setIdentity:` and then directly calling `-tryUploadImage`, I would add a new method similar to `-accountPickerDidSelectIdentity:askEveryTime:` e.g. `-userSignedInToSaveImageWithIdentity:` which would set the identity to use and then call `tryUploadImage`

File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_mediator.mm
Line 150, Patchset 2 (Parent): CHECK(_identityManager->HasPrimaryAccount(signin::ConsentLevel::kSignin),
base::NotFatalUntil::M152);
Quentin Pubert . unresolved

Instead of removing the CHECK, maybe add `|| base::FeatureList::IsEnabled(kIOSSaveToPhotosSignedOut)` to the condition.

Line 311, Patchset 2 (Latest): [self.delegate openSignIn];
Quentin Pubert . unresolved

Only do that if `base::FeatureList::IsEnabled(kIOSSaveToPhotosSignedOut)`, otherwise `-hideSaveToPhotos`

Open in Gerrit

Related details

Attention is currently required from:
  • Joseph Lanza
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: Ib5199330ee3a0830291f229b4b04043e3a186e66
Gerrit-Change-Number: 7806828
Gerrit-PatchSet: 2
Gerrit-Owner: Joseph Lanza <josep...@google.com>
Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
Gerrit-Attention: Joseph Lanza <josep...@google.com>
Gerrit-Comment-Date: Thu, 30 Apr 2026 12:55:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Joseph Lanza (Gerrit)

unread,
Apr 30, 2026, 11:00:19 AM (5 days ago) Apr 30
to Quentin Pubert, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Quentin Pubert

Joseph Lanza added 6 comments

File ios/chrome/app/strings/ios_strings.grd
Line 7486, Patchset 2: Save photos in your Google Photos and access them any time.
Quentin Pubert . resolved

We might want a different string here since there is no such thing as Choose from Photos so it is not accurate to say "access them any time"

Joseph Lanza

Even if there is no 'Choose from Photos' option currently, users can still access their photo inside their navigator or using the Photos app.

File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_coordinator.mm
Line 395, Patchset 2: if (_signinCoordinator.viewWillPersist) {
Quentin Pubert . resolved
```suggestion
CHECK(base::FeatureList::IsEnabled(kIOSSaveToPhotosSignedOut));
if (_signinCoordinator.viewWillPersist) {
```
Joseph Lanza

Done

Line 427, Patchset 2: [self startValidationSpinnerForAccountPicker];
[self hideAccountPicker];
Quentin Pubert . resolved

If I am not mistaken the account picker is not presented at this point so none of this is doing anything.

Joseph Lanza

Done

Line 430, Patchset 2: [_mediator tryUploadImage];
Quentin Pubert . resolved

Instead of adding `-setIdentity:` and then directly calling `-tryUploadImage`, I would add a new method similar to `-accountPickerDidSelectIdentity:askEveryTime:` e.g. `-userSignedInToSaveImageWithIdentity:` which would set the identity to use and then call `tryUploadImage`

Joseph Lanza

Done

File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_mediator.mm
Line 150, Patchset 2 (Parent): CHECK(_identityManager->HasPrimaryAccount(signin::ConsentLevel::kSignin),
base::NotFatalUntil::M152);
Quentin Pubert . resolved

Instead of removing the CHECK, maybe add `|| base::FeatureList::IsEnabled(kIOSSaveToPhotosSignedOut)` to the condition.

Joseph Lanza

Done

Line 311, Patchset 2: [self.delegate openSignIn];
Quentin Pubert . resolved

Only do that if `base::FeatureList::IsEnabled(kIOSSaveToPhotosSignedOut)`, otherwise `-hideSaveToPhotos`

Joseph Lanza

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Quentin Pubert
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: Ib5199330ee3a0830291f229b4b04043e3a186e66
    Gerrit-Change-Number: 7806828
    Gerrit-PatchSet: 3
    Gerrit-Owner: Joseph Lanza <josep...@google.com>
    Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
    Gerrit-Attention: Quentin Pubert <qpu...@google.com>
    Gerrit-Comment-Date: Thu, 30 Apr 2026 14:59:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Quentin Pubert <qpu...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Quentin Pubert (Gerrit)

    unread,
    4:35 AM (4 hours ago) 4:35 AM
    to Joseph Lanza, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
    Attention needed from Joseph Lanza

    Quentin Pubert added 2 comments

    Commit Message
    Line 8, Patchset 4 (Latest):
    Quentin Pubert . unresolved

    please add a description and bug before submitting

    File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_mediator.h
    Line 114, Patchset 4 (Latest):// Tries to upload the image.
    - (void)tryUploadImage;
    Quentin Pubert . unresolved

    this should not be public

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joseph Lanza
    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: Ib5199330ee3a0830291f229b4b04043e3a186e66
      Gerrit-Change-Number: 7806828
      Gerrit-PatchSet: 4
      Gerrit-Owner: Joseph Lanza <josep...@google.com>
      Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
      Gerrit-Attention: Joseph Lanza <josep...@google.com>
      Gerrit-Comment-Date: Tue, 05 May 2026 08:35:29 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Joseph Lanza (Gerrit)

      unread,
      4:50 AM (4 hours ago) 4:50 AM
      to Chromium LUCI CQ, Quentin Pubert, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
      Attention needed from Quentin Pubert

      Joseph Lanza added 2 comments

      Commit Message
      Line 8, Patchset 4:
      Quentin Pubert . resolved

      please add a description and bug before submitting

      Joseph Lanza

      Done

      File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_mediator.h
      Line 114, Patchset 4:// Tries to upload the image.
      - (void)tryUploadImage;
      Quentin Pubert . resolved

      this should not be public

      Joseph Lanza

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Quentin Pubert
      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: Ib5199330ee3a0830291f229b4b04043e3a186e66
        Gerrit-Change-Number: 7806828
        Gerrit-PatchSet: 7
        Gerrit-Owner: Joseph Lanza <josep...@google.com>
        Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
        Gerrit-Attention: Quentin Pubert <qpu...@google.com>
        Gerrit-Comment-Date: Tue, 05 May 2026 08:50:06 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Quentin Pubert <qpu...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Quentin Pubert (Gerrit)

        unread,
        4:53 AM (4 hours ago) 4:53 AM
        to Joseph Lanza, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
        Attention needed from Joseph Lanza

        Quentin Pubert voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joseph Lanza
        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: Ib5199330ee3a0830291f229b4b04043e3a186e66
          Gerrit-Change-Number: 7806828
          Gerrit-PatchSet: 7
          Gerrit-Owner: Joseph Lanza <josep...@google.com>
          Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
          Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
          Gerrit-Attention: Joseph Lanza <josep...@google.com>
          Gerrit-Comment-Date: Tue, 05 May 2026 08:53:35 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Arthur Milchior (Gerrit)

          unread,
          5:58 AM (3 hours ago) 5:58 AM
          to Joseph Lanza, Quentin Pubert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
          Attention needed from Joseph Lanza

          Arthur Milchior voted and added 1 comment

          Votes added by Arthur Milchior

          Code-Review+1

          1 comment

          File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_coordinator.mm
          Line 414, Patchset 7 (Latest): DoNothingContinuationProvider()];
          Arthur Milchior . unresolved

          You should probably not explicitly in the CL comment and in the code documentation that if the user sign-in with an account belonging to another profile, the "save to photo" action is cancelled, and the user don’t even have access to the photo anymore.

          Because I expect it would be non trivial for a reader that don’t know about profil transition that in this case, sign-in can be successful but nothing occurs.


          If you don’t want to deal opening the SaveToPhotosCoordinator in the new profile, I would have expected you at least reopen the current URL, so that the user restart the save flow.

          If you plan to eventually ensure that the flow restrat from the other profile, then I’d suggest adding a TODO here.

          In case you don’t know, you can request a managerchrome.com account to test the behavior of chrome with managed account

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Joseph Lanza
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: Ib5199330ee3a0830291f229b4b04043e3a186e66
          Gerrit-Change-Number: 7806828
          Gerrit-PatchSet: 7
          Gerrit-Owner: Joseph Lanza <josep...@google.com>
          Gerrit-Reviewer: Arthur Milchior <arthurm...@chromium.org>
          Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
          Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
          Gerrit-Attention: Joseph Lanza <josep...@google.com>
          Gerrit-Comment-Date: Tue, 05 May 2026 09:57:44 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Joseph Lanza (Gerrit)

          unread,
          7:38 AM (1 hour ago) 7:38 AM
          to Arthur Milchior, Quentin Pubert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
          Attention needed from Arthur Milchior and Quentin Pubert

          Joseph Lanza added 1 comment

          File ios/chrome/browser/save_to_photos/ui_bundled/save_to_photos_coordinator.mm
          Line 414, Patchset 7: DoNothingContinuationProvider()];
          Arthur Milchior . resolved

          You should probably not explicitly in the CL comment and in the code documentation that if the user sign-in with an account belonging to another profile, the "save to photo" action is cancelled, and the user don’t even have access to the photo anymore.

          Because I expect it would be non trivial for a reader that don’t know about profil transition that in this case, sign-in can be successful but nothing occurs.


          If you don’t want to deal opening the SaveToPhotosCoordinator in the new profile, I would have expected you at least reopen the current URL, so that the user restart the save flow.

          If you plan to eventually ensure that the flow restrat from the other profile, then I’d suggest adding a TODO here.

          In case you don’t know, you can request a managerchrome.com account to test the behavior of chrome with managed account

          Joseph Lanza

          I wanted to try to handle this in another CL, I added a TODO as you suggested

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Arthur Milchior
          • Quentin Pubert
          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: Ib5199330ee3a0830291f229b4b04043e3a186e66
            Gerrit-Change-Number: 7806828
            Gerrit-PatchSet: 9
            Gerrit-Owner: Joseph Lanza <josep...@google.com>
            Gerrit-Reviewer: Arthur Milchior <arthurm...@chromium.org>
            Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
            Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
            Gerrit-Attention: Arthur Milchior <arthurm...@chromium.org>
            Gerrit-Attention: Quentin Pubert <qpu...@google.com>
            Gerrit-Comment-Date: Tue, 05 May 2026 11:37:43 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Arthur Milchior <arthurm...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages