[iOS] Sign in flow for 'Save to Drive' [chromium/src : main]

0 views
Skip to first unread message

Quentin Pubert (Gerrit)

unread,
Mar 17, 2026, 6:33:29 AM (6 days ago) Mar 17
to Joseph Lanza, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Joseph Lanza

Quentin Pubert added 10 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Quentin Pubert . resolved

Please read all the comments before proceeding. My first comments suggested how to adjust your current approach (let the mediator ask the coordinator to show sign-in through a delegate protocol) but I then realized this may not be necessary, since `saveWithSelectedIdentity:` should probably not be called if the selected destination is Drive and the user is not signed-in.

File ios/chrome/browser/save_to_drive/ui_bundled/DEPS
Line 4, Patchset 3 (Latest): "+ios/chrome/browser/authentication/ui_bundled",
"+ios/chrome/browser/authentication/ui_bundled/signin",
Quentin Pubert . unresolved
One is probably enough
```suggestion
"+ios/chrome/browser/authentication/ui_bundled",
```
File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.h
Line 28, Patchset 3 (Latest):- (void)openSignIn;
Quentin Pubert . unresolved

This should be declared a delegate protocol file, with a comment to describe what it does. Since it is a delegate method it should be named accordingly e.g. ``` // Called when `mediator` wants to open sign-in.

  • (void)mediatorWantsToOpenSignIn:(SaveToDriveMediator*)mediator;
  • ```
File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
Line 49, Patchset 3 (Latest): ManageStorageAlertCommands>
Quentin Pubert . unresolved
You will probably have
```suggestion
ManageStorageAlertCommands,
SaveToDriveMediatorDelegate>
```
Line 59, Patchset 3 (Latest): SigninCoordinator* _signinCoordinator;
Quentin Pubert . unresolved

This looks unused
```suggestion
```

Line 263, Patchset 3 (Latest): __weak __typeof(self) weakSelf = self;
SigninCoordinatorCompletionCallback completion =
^(SigninCoordinator* coordinator, SigninCoordinatorResult result,
id<SystemIdentity> identity) {
if (!weakSelf) {
return;
}
SaveToDriveCoordinator* strongSelf = weakSelf;
strongSelf->_isSigningIn = NO;
if (result == SigninCoordinatorResultSuccess) {
[strongSelf->_mediator saveWithSelectedIdentity:identity];
} else {
id<SaveToDriveCommands> saveToDriveHandler = HandlerForProtocol(
strongSelf.browser->GetCommandDispatcher(), SaveToDriveCommands);
[saveToDriveHandler hideSaveToDrive];
}
};

AuthenticationOperation operation = AuthenticationOperation::kSigninOnly;
ShowSigninCommand* command = [[ShowSigninCommand alloc]
initWithOperation:operation
identity:nil
accessPoint:signin_metrics::AccessPoint::kSaveToDriveIos
promoAction:signin_metrics::PromoAction::
PROMO_ACTION_NO_SIGNIN_PROMO
completion:completion];
Quentin Pubert . unresolved
Better to avoid long blocks
```suggestion
__weak __typeof(self) weakSelf = self;
ShowSigninCommand* command = [[ShowSigninCommand alloc]
initWithOperation:AuthenticationOperation::kSigninOnly
identity:nil
accessPoint:signin_metrics::AccessPoint::kSaveToDriveIos
promoAction:signin_metrics::PromoAction::
PROMO_ACTION_NO_SIGNIN_PROMO
completion:^(SigninCoordinator* coordinator, SigninCoordinatorResult result, id<SystemIdentity> identity) {
[weakSelf doSigninCompletionWithResult:result identity:identity];
}];
```

Then lower in the file (in #pragma mark - Private)

```
- (void)doSigninCompletionWithResult:(SigninCoordinatorResult)result identity:(id<SystemIdentity>)identity {
_isSigningIn = NO;
if (result == SigninCoordinatorResultSuccess) {
[_mediator saveWithSelectedIdentity:identity];
} else {
id<SaveToDriveCommands> saveToDriveHandler = HandlerForProtocol(
strongSelf.browser->GetCommandDispatcher(), SaveToDriveCommands);
[saveToDriveHandler hideSaveToDrive];
}
}
```
File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.h
Line 42, Patchset 3 (Latest):@property(nonatomic, strong) SaveToDriveCoordinator* delegate;
Quentin Pubert . unresolved

This should be a weak reference since strong references are used to define ownership relations, in this case the coordinator owns the mediator. Also this should be a protocol implemented privately by the coordinator
```suggestion
@property(nonatomic, weak) id<SaveToDriveMediatorDelegate> delegate;
```

Line 11, Patchset 3 (Latest):#import "ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.h"
Quentin Pubert . unresolved

It is best to avoid circular dependencies, a mediator never depends on its own coordinator.

File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.mm
Line 34, Patchset 3 (Latest):#import "ios/chrome/browser/signin/model/identity_manager_factory.h"
Quentin Pubert . unresolved

Probably unnecessary, the identity manager is a service injected into the mediator by the coordinator. The coordinator is the one using the factory to extract the service from a profile

Line 188, Patchset 3 (Latest): bool signedIn = [self isSignedIn];
Quentin Pubert . unresolved

It think it would be best to avoid calling `saveWithSelectedIdentity:` if there is no identity and Drive is selected since this method was written with the assumption that this was the case. Instead I think when `didSelectIdentity:` is called on the coordinator, then the coordinator should ask the mediator `- (BOOL)selectedFileDestinationRequiresSignin` and if it returns YES then the coordinator shows sign-in.

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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
Gerrit-Change-Number: 7671037
Gerrit-PatchSet: 3
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, 17 Mar 2026 10:33:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Joseph Lanza (Gerrit)

unread,
Mar 17, 2026, 1:02:38 PM (6 days ago) Mar 17
to Quentin Pubert, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Quentin Pubert

Joseph Lanza added 9 comments

File ios/chrome/browser/save_to_drive/ui_bundled/DEPS
Line 4, Patchset 3: "+ios/chrome/browser/authentication/ui_bundled",
"+ios/chrome/browser/authentication/ui_bundled/signin",
Quentin Pubert . resolved
One is probably enough
```suggestion
"+ios/chrome/browser/authentication/ui_bundled",
```
Joseph Lanza

Marked as resolved.

File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.h
Line 28, Patchset 3:- (void)openSignIn;
Quentin Pubert . resolved

This should be declared a delegate protocol file, with a comment to describe what it does. Since it is a delegate method it should be named accordingly e.g. ``` // Called when `mediator` wants to open sign-in.

  • (void)mediatorWantsToOpenSignIn:(SaveToDriveMediator*)mediator;
  • ```
Joseph Lanza

Acknowledged

File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
Line 49, Patchset 3: ManageStorageAlertCommands>
Quentin Pubert . resolved
You will probably have
```suggestion
ManageStorageAlertCommands,
SaveToDriveMediatorDelegate>
```
Joseph Lanza

Acknowledged

Line 59, Patchset 3: SigninCoordinator* _signinCoordinator;
Quentin Pubert . resolved

This looks unused
```suggestion
```

Joseph Lanza

Removed

Line 263, Patchset 3: __weak __typeof(self) weakSelf = self;

SigninCoordinatorCompletionCallback completion =
^(SigninCoordinator* coordinator, SigninCoordinatorResult result,
id<SystemIdentity> identity) {
if (!weakSelf) {
return;
}
SaveToDriveCoordinator* strongSelf = weakSelf;
strongSelf->_isSigningIn = NO;
if (result == SigninCoordinatorResultSuccess) {
[strongSelf->_mediator saveWithSelectedIdentity:identity];
} else {
id<SaveToDriveCommands> saveToDriveHandler = HandlerForProtocol(
strongSelf.browser->GetCommandDispatcher(), SaveToDriveCommands);
[saveToDriveHandler hideSaveToDrive];
}
};

AuthenticationOperation operation = AuthenticationOperation::kSigninOnly;
ShowSigninCommand* command = [[ShowSigninCommand alloc]
initWithOperation:operation
identity:nil
accessPoint:signin_metrics::AccessPoint::kSaveToDriveIos
promoAction:signin_metrics::PromoAction::
PROMO_ACTION_NO_SIGNIN_PROMO
completion:completion];
Quentin Pubert . resolved
Better to avoid long blocks
```suggestion
__weak __typeof(self) weakSelf = self;
ShowSigninCommand* command = [[ShowSigninCommand alloc]
initWithOperation:AuthenticationOperation::kSigninOnly
identity:nil
accessPoint:signin_metrics::AccessPoint::kSaveToDriveIos
promoAction:signin_metrics::PromoAction::
PROMO_ACTION_NO_SIGNIN_PROMO
completion:^(SigninCoordinator* coordinator, SigninCoordinatorResult result, id<SystemIdentity> identity) {
[weakSelf doSigninCompletionWithResult:result identity:identity];
}];
```

Then lower in the file (in #pragma mark - Private)

```
- (void)doSigninCompletionWithResult:(SigninCoordinatorResult)result identity:(id<SystemIdentity>)identity {
_isSigningIn = NO;
if (result == SigninCoordinatorResultSuccess) {
[_mediator saveWithSelectedIdentity:identity];
} else {
id<SaveToDriveCommands> saveToDriveHandler = HandlerForProtocol(
strongSelf.browser->GetCommandDispatcher(), SaveToDriveCommands);
[saveToDriveHandler hideSaveToDrive];
}
}
```
Joseph Lanza

Done

File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.h
Line 42, Patchset 3:@property(nonatomic, strong) SaveToDriveCoordinator* delegate;
Quentin Pubert . resolved

This should be a weak reference since strong references are used to define ownership relations, in this case the coordinator owns the mediator. Also this should be a protocol implemented privately by the coordinator
```suggestion
@property(nonatomic, weak) id<SaveToDriveMediatorDelegate> delegate;
```

Joseph Lanza

Acknowledged

Line 11, Patchset 3:#import "ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.h"
Quentin Pubert . resolved

It is best to avoid circular dependencies, a mediator never depends on its own coordinator.

Joseph Lanza

Done

File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.mm
Line 34, Patchset 3:#import "ios/chrome/browser/signin/model/identity_manager_factory.h"
Quentin Pubert . resolved

Probably unnecessary, the identity manager is a service injected into the mediator by the coordinator. The coordinator is the one using the factory to extract the service from a profile

Joseph Lanza

Done

Line 188, Patchset 3: bool signedIn = [self isSignedIn];
Quentin Pubert . resolved

It think it would be best to avoid calling `saveWithSelectedIdentity:` if there is no identity and Drive is selected since this method was written with the assumption that this was the case. Instead I think when `didSelectIdentity:` is called on the coordinator, then the coordinator should ask the mediator `- (BOOL)selectedFileDestinationRequiresSignin` and if it returns YES then the coordinator shows sign-in.

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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
    Gerrit-Change-Number: 7671037
    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, 17 Mar 2026 17:02:24 +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,
    Mar 18, 2026, 4:26:33 AM (5 days ago) Mar 18
    to Joseph Lanza, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Joseph Lanza

    Quentin Pubert added 6 comments

    File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
    Line 148, Patchset 7 (Latest): if ([_mediator selectedFileDestinationRequiresSignin]) {
    [self openSignIn];
    return;
    }
    Quentin Pubert . unresolved
    Everything that modifies the behaviour should be behind the flag
    ```suggestion
    if (base::FeatureList::IsEnabled(kIOSSaveToDriveSignedOut)) {
    if ([_mediator selectedFileDestinationRequiresSignin]) {
    [self openSignIn];
    return;
    }
    }
    ```
    Line 168, Patchset 7 (Latest): if (_isSigningIn) {
    return;
    }
    Quentin Pubert . unresolved

    ditto

    Line 237, Patchset 7 (Latest): UIViewController* presenter =
    _accountPickerCoordinator.viewController ?: self.baseViewController;
    CHECK(presenter);
    [presenter presentViewController:_alertController
    animated:YES
    completion:nil];
    Quentin Pubert . unresolved

    ditto

    Line 253, Patchset 7 (Latest): UIViewController* presenter =
    _accountPickerCoordinator.viewController ?: self.baseViewController;
    [googleOneHandler
    showGoogleOneForIdentity:identity
    entryPoint:GoogleOneEntryPoint::kSaveToDriveAlert
    baseViewController:presenter];
    Quentin Pubert . unresolved

    ditto

    Line 293, Patchset 7 (Latest): SaveToDriveCoordinator* strongSelf = self;
    Quentin Pubert . unresolved

    This is unnecessary, `self` can be used directly.

    File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.mm
    Line 298, Patchset 7 (Latest): bool signedIn = [self isSignedIn];
    bool identityButtonHidden =
    _fileDestination == FileDestination::kFiles || !signedIn;
    [self.accountPickerConsumer setIdentityButtonHidden:identityButtonHidden
    Quentin Pubert . unresolved

    ditto

    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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
      Gerrit-Change-Number: 7671037
      Gerrit-PatchSet: 7
      Gerrit-Owner: Joseph Lanza <josep...@google.com>
      Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
      Gerrit-Attention: Joseph Lanza <josep...@google.com>
      Gerrit-Comment-Date: Wed, 18 Mar 2026 08:26:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Joseph Lanza (Gerrit)

      unread,
      Mar 18, 2026, 6:04:48 AM (5 days ago) Mar 18
      to Quentin Pubert, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Quentin Pubert

      Joseph Lanza added 6 comments

      File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
      Line 148, Patchset 7: if ([_mediator selectedFileDestinationRequiresSignin]) {
      [self openSignIn];
      return;
      }
      Quentin Pubert . resolved
      Everything that modifies the behaviour should be behind the flag
      ```suggestion
      if (base::FeatureList::IsEnabled(kIOSSaveToDriveSignedOut)) {
      if ([_mediator selectedFileDestinationRequiresSignin]) {
      [self openSignIn];
      return;
      }
      }
      ```
      Joseph Lanza

      Done

      Line 168, Patchset 7: if (_isSigningIn) {
      return;
      }
      Quentin Pubert . resolved

      ditto

      Joseph Lanza

      Done

      Line 237, Patchset 7: UIViewController* presenter =

      _accountPickerCoordinator.viewController ?: self.baseViewController;
      CHECK(presenter);
      [presenter presentViewController:_alertController
      animated:YES
      completion:nil];
      Quentin Pubert . resolved

      ditto

      Joseph Lanza

      Done

      Line 253, Patchset 7: UIViewController* presenter =

      _accountPickerCoordinator.viewController ?: self.baseViewController;
      [googleOneHandler
      showGoogleOneForIdentity:identity
      entryPoint:GoogleOneEntryPoint::kSaveToDriveAlert
      baseViewController:presenter];
      Quentin Pubert . resolved

      ditto

      Joseph Lanza

      Done

      Line 293, Patchset 7: SaveToDriveCoordinator* strongSelf = self;
      Quentin Pubert . resolved

      This is unnecessary, `self` can be used directly.

      Joseph Lanza

      Done

      File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.mm
      Line 298, Patchset 7: bool signedIn = [self isSignedIn];

      bool identityButtonHidden =
      _fileDestination == FileDestination::kFiles || !signedIn;
      [self.accountPickerConsumer setIdentityButtonHidden:identityButtonHidden
      Quentin Pubert . resolved

      ditto

      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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
        Gerrit-Change-Number: 7671037
        Gerrit-PatchSet: 8
        Gerrit-Owner: Joseph Lanza <josep...@google.com>
        Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
        Gerrit-Attention: Quentin Pubert <qpu...@google.com>
        Gerrit-Comment-Date: Wed, 18 Mar 2026 10:04:34 +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,
        Mar 18, 2026, 7:09:35 AM (5 days ago) Mar 18
        to Joseph Lanza, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
        Attention needed from Joseph Lanza

        Quentin Pubert added 1 comment

        Patchset-level comments
        File-level comment, Patchset 8 (Latest):
        Quentin Pubert . resolved

        LGTM, will +1 once tests have been added

        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 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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
        Gerrit-Change-Number: 7671037
        Gerrit-PatchSet: 8
        Gerrit-Owner: Joseph Lanza <josep...@google.com>
        Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
        Gerrit-Attention: Joseph Lanza <josep...@google.com>
        Gerrit-Comment-Date: Wed, 18 Mar 2026 11:09:23 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Quentin Pubert (Gerrit)

        unread,
        Mar 18, 2026, 12:17:44 PM (5 days ago) Mar 18
        to Joseph Lanza, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@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 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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
        Gerrit-Change-Number: 7671037
        Gerrit-PatchSet: 10
        Gerrit-Owner: Joseph Lanza <josep...@google.com>
        Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
        Gerrit-Attention: Joseph Lanza <josep...@google.com>
        Gerrit-Comment-Date: Wed, 18 Mar 2026 16:17:26 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Quentin Pubert (Gerrit)

        unread,
        Mar 20, 2026, 5:52:43 AM (3 days ago) Mar 20
        to Joseph Lanza, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@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 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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
        Gerrit-Change-Number: 7671037
        Gerrit-PatchSet: 11
        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: Fri, 20 Mar 2026 09:52:28 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Quentin Pubert (Gerrit)

        unread,
        8:30 AM (5 hours ago) 8:30 AM
        to Joseph Lanza, Olivier Robin, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
        Attention needed from Joseph Lanza and Olivier Robin

        Quentin Pubert voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joseph Lanza
        • Olivier Robin
        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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
        Gerrit-Change-Number: 7671037
        Gerrit-PatchSet: 12
        Gerrit-Owner: Joseph Lanza <josep...@google.com>
        Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
        Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
        Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
        Gerrit-Attention: Olivier Robin <olivie...@chromium.org>
        Gerrit-Attention: Joseph Lanza <josep...@google.com>
        Gerrit-Comment-Date: Mon, 23 Mar 2026 12:29:45 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Olivier Robin (Gerrit)

        unread,
        8:50 AM (4 hours ago) 8:50 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
        Attention needed from Joseph Lanza

        Olivier Robin added 6 comments

        File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
        Line 150, Patchset 12 (Latest): [self openSignIn];
        Olivier Robin . unresolved

        Why do we need to signin when an identity is selected? Is it only if `identity == nil` ?

        Line 244, Patchset 12 (Latest): _accountPickerCoordinator.viewController ?: self.baseViewController;
        Olivier Robin . unresolved

        why is this needed? Do we add a way to access storage management?

        Is it possible that baseViewController presents another VC?

        Line 285, Patchset 12 (Latest): [_accountPickerCoordinator stopAnimated:YES];
        Olivier Robin . unresolved

        can there be a problem with the animation here? Does the show signin command wait for this dismissal to be complete?

        Line 285, Patchset 12 (Latest): [_accountPickerCoordinator stopAnimated:YES];
        Olivier Robin . unresolved

        can you check what happens if sign in is disabled by policy?

        Line 312, Patchset 12 (Latest): [saveToDriveHandler hideSaveToDrive];
        Olivier Robin . unresolved

        do we want to go back to the method selection? Is it possible that we lose the download here?

        File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.h
        Line 71, Patchset 12 (Latest):// in.
        Olivier Robin . unresolved

        anf the user is not signed in.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joseph Lanza
        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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
          Gerrit-Change-Number: 7671037
          Gerrit-PatchSet: 12
          Gerrit-Owner: Joseph Lanza <josep...@google.com>
          Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
          Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
          Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
          Gerrit-Attention: Joseph Lanza <josep...@google.com>
          Gerrit-Comment-Date: Mon, 23 Mar 2026 12:50:14 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Joseph Lanza (Gerrit)

          unread,
          9:53 AM (3 hours ago) 9:53 AM
          to Quentin Pubert, Olivier Robin, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
          Attention needed from Olivier Robin and Quentin Pubert

          Joseph Lanza added 6 comments

          File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
          Line 150, Patchset 12: [self openSignIn];
          Olivier Robin . resolved

          Why do we need to signin when an identity is selected? Is it only if `identity == nil` ?

          Joseph Lanza

          Local file downloads must not require user signing in.
          The `saveWithSelectedIdentity:identity` method manages both local and drive storage logic; however, a sign-in prompt should only be triggered if the user attempts to save to Drive while signed out.

          Line 244, Patchset 12: _accountPickerCoordinator.viewController ?: self.baseViewController;
          Olivier Robin . unresolved

          why is this needed? Do we add a way to access storage management?

          Is it possible that baseViewController presents another VC?

          Joseph Lanza

          When the sign-in screen opens, the account picker must be dismissed first.
          To show the storage manager after a sign in, it should be presented on top of the baseViewController, and not the account picker.

          Line 285, Patchset 12: [_accountPickerCoordinator stopAnimated:YES];
          Olivier Robin . unresolved

          can you check what happens if sign in is disabled by policy?

          Joseph Lanza

          If "sign in" is disabled by policy, Drive is not an option you can select, therefore this code path is unreachable.

          Line 285, Patchset 12: [_accountPickerCoordinator stopAnimated:YES];
          Olivier Robin . unresolved

          can there be a problem with the animation here? Does the show signin command wait for this dismissal to be complete?

          Joseph Lanza

          I don't think so but I am not sure how to test this.

          Line 312, Patchset 12: [saveToDriveHandler hideSaveToDrive];
          Olivier Robin . unresolved

          do we want to go back to the method selection? Is it possible that we lose the download here?

          Joseph Lanza

          If the login fails, the sign in screen close and you need to tap the "Save..." button again to display the account picker again. The download is not lost.

          File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_mediator.h
          Line 71, Patchset 12:// in.
          Olivier Robin . resolved

          anf the user is not signed in.

          Joseph Lanza

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Olivier Robin
          • Quentin Pubert
          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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
            Gerrit-Change-Number: 7671037
            Gerrit-PatchSet: 13
            Gerrit-Owner: Joseph Lanza <josep...@google.com>
            Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
            Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
            Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
            Gerrit-Attention: Olivier Robin <olivie...@chromium.org>
            Gerrit-Attention: Quentin Pubert <qpu...@google.com>
            Gerrit-Comment-Date: Mon, 23 Mar 2026 13:53:14 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Olivier Robin <olivie...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Olivier Robin (Gerrit)

            unread,
            10:05 AM (3 hours ago) 10:05 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
            Attention needed from Joseph Lanza and Quentin Pubert

            Olivier Robin voted and added 4 comments

            Votes added by Olivier Robin

            Code-Review+1

            4 comments

            File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
            Line 244, Patchset 12: _accountPickerCoordinator.viewController ?: self.baseViewController;
            Olivier Robin . unresolved

            why is this needed? Do we add a way to access storage management?

            Is it possible that baseViewController presents another VC?

            Joseph Lanza

            When the sign-in screen opens, the account picker must be dismissed first.
            To show the storage manager after a sign in, it should be presented on top of the baseViewController, and not the account picker.

            Olivier Robin

            Would it be better to have a variable "isPresentingAccountPicker" to check?

            Line 285, Patchset 12: [_accountPickerCoordinator stopAnimated:YES];
            Olivier Robin . unresolved

            can there be a problem with the animation here? Does the show signin command wait for this dismissal to be complete?

            Joseph Lanza

            I don't think so but I am not sure how to test this.

            Olivier Robin

            Ack. It may still cause issues in the future, so maybe try to see why it works and why the new VC is not blocked by the dismissed account picker.

            Line 285, Patchset 12: [_accountPickerCoordinator stopAnimated:YES];
            Olivier Robin . resolved

            can you check what happens if sign in is disabled by policy?

            Joseph Lanza

            If "sign in" is disabled by policy, Drive is not an option you can select, therefore this code path is unreachable.

            Olivier Robin

            Acknowledged

            Line 312, Patchset 12: [saveToDriveHandler hideSaveToDrive];
            Olivier Robin . resolved

            do we want to go back to the method selection? Is it possible that we lose the download here?

            Joseph Lanza

            If the login fails, the sign in screen close and you need to tap the "Save..." button again to display the account picker again. The download is not lost.

            Olivier Robin

            Acknowledged

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Joseph Lanza
            • Quentin Pubert
            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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
              Gerrit-Change-Number: 7671037
              Gerrit-PatchSet: 13
              Gerrit-Owner: Joseph Lanza <josep...@google.com>
              Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
              Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
              Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
              Gerrit-Attention: Joseph Lanza <josep...@google.com>
              Gerrit-Attention: Quentin Pubert <qpu...@google.com>
              Gerrit-Comment-Date: Mon, 23 Mar 2026 14:04:49 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              Comment-In-Reply-To: Olivier Robin <olivie...@chromium.org>
              Comment-In-Reply-To: Joseph Lanza <josep...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Joseph Lanza (Gerrit)

              unread,
              11:25 AM (2 hours ago) 11:25 AM
              to Olivier Robin, Quentin Pubert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
              Attention needed from Olivier Robin and Quentin Pubert

              Joseph Lanza added 2 comments

              File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
              Line 244, Patchset 12: _accountPickerCoordinator.viewController ?: self.baseViewController;
              Olivier Robin . unresolved

              why is this needed? Do we add a way to access storage management?

              Is it possible that baseViewController presents another VC?

              Joseph Lanza

              When the sign-in screen opens, the account picker must be dismissed first.
              To show the storage manager after a sign in, it should be presented on top of the baseViewController, and not the account picker.

              Olivier Robin

              Would it be better to have a variable "isPresentingAccountPicker" to check?

              Joseph Lanza

              changed to check _accountPickerCoordinator == nil, and use self.baseViewController as fallback.

              Line 285, Patchset 12: [_accountPickerCoordinator stopAnimated:YES];
              Olivier Robin . unresolved

              can there be a problem with the animation here? Does the show signin command wait for this dismissal to be complete?

              Joseph Lanza

              I don't think so but I am not sure how to test this.

              Olivier Robin

              Ack. It may still cause issues in the future, so maybe try to see why it works and why the new VC is not blocked by the dismissed account picker.

              Joseph Lanza

              Refactored to prevent any issue

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Olivier Robin
              • Quentin Pubert
              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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
                Gerrit-Change-Number: 7671037
                Gerrit-PatchSet: 14
                Gerrit-Owner: Joseph Lanza <josep...@google.com>
                Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
                Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
                Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
                Gerrit-Attention: Olivier Robin <olivie...@chromium.org>
                Gerrit-Attention: Quentin Pubert <qpu...@google.com>
                Gerrit-Comment-Date: Mon, 23 Mar 2026 15:25:26 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Olivier Robin (Gerrit)

                unread,
                11:58 AM (1 hour ago) 11: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
                Attention needed from Joseph Lanza and Quentin Pubert

                Olivier Robin added 1 comment

                File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
                Line 165, Patchset 14 (Latest): [_accountPickerCoordinator stopAnimated:YES];
                Olivier Robin . unresolved

                should you set it to nil then?
                same for other places where it is stopped.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Joseph Lanza
                • Quentin Pubert
                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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
                Gerrit-Change-Number: 7671037
                Gerrit-PatchSet: 14
                Gerrit-Owner: Joseph Lanza <josep...@google.com>
                Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
                Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
                Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
                Gerrit-Attention: Joseph Lanza <josep...@google.com>
                Gerrit-Attention: Quentin Pubert <qpu...@google.com>
                Gerrit-Comment-Date: Mon, 23 Mar 2026 15:58:26 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Quentin Pubert (Gerrit)

                unread,
                12:36 PM (1 hour ago) 12:36 PM
                to Joseph Lanza, Olivier Robin, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
                Attention needed from Joseph Lanza

                Quentin Pubert added 1 comment

                File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
                Line 165, Patchset 14 (Latest): [_accountPickerCoordinator stopAnimated:YES];
                Olivier Robin . unresolved

                should you set it to nil then?
                same for other places where it is stopped.

                Quentin Pubert

                It is already set to nil in `accountPickerCoordinatorDidStop`

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Joseph Lanza
                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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
                Gerrit-Change-Number: 7671037
                Gerrit-PatchSet: 14
                Gerrit-Owner: Joseph Lanza <josep...@google.com>
                Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
                Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
                Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
                Gerrit-Attention: Joseph Lanza <josep...@google.com>
                Gerrit-Comment-Date: Mon, 23 Mar 2026 16:35:58 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Olivier Robin <olivie...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Olivier Robin (Gerrit)

                unread,
                12:40 PM (1 hour ago) 12:40 PM
                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
                Attention needed from Joseph Lanza and Quentin Pubert

                Olivier Robin voted and added 1 comment

                Votes added by Olivier Robin

                Code-Review+1

                1 comment

                File ios/chrome/browser/save_to_drive/ui_bundled/save_to_drive_coordinator.mm
                Line 165, Patchset 14 (Latest): [_accountPickerCoordinator stopAnimated:YES];
                Olivier Robin . resolved

                should you set it to nil then?
                same for other places where it is stopped.

                Quentin Pubert

                It is already set to nil in `accountPickerCoordinatorDidStop`

                Olivier Robin

                Acknowledged

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Joseph Lanza
                • Quentin Pubert
                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: I7f25890d50fa788dfa71d2f70c75f286ceb5272c
                  Gerrit-Change-Number: 7671037
                  Gerrit-PatchSet: 14
                  Gerrit-Owner: Joseph Lanza <josep...@google.com>
                  Gerrit-Reviewer: Joseph Lanza <josep...@google.com>
                  Gerrit-Reviewer: Olivier Robin <olivie...@chromium.org>
                  Gerrit-Reviewer: Quentin Pubert <qpu...@google.com>
                  Gerrit-Attention: Joseph Lanza <josep...@google.com>
                  Gerrit-Attention: Quentin Pubert <qpu...@google.com>
                  Gerrit-Comment-Date: Mon, 23 Mar 2026 16:39:54 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  Comment-In-Reply-To: Olivier Robin <olivie...@chromium.org>
                  Comment-In-Reply-To: Quentin Pubert <qpu...@google.com>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy
                  Reply all
                  Reply to author
                  Forward
                  0 new messages