New issue
Advanced search Search tips

Issue 692525 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CardUnmaskPromptViewBridge should probably not own a view controller

Project Member Reported by mahmadi@chromium.org, Feb 15 2017

Issue description

CardUnmaskPromptViewBridge seems like an unusual object to own a view controller. It should ideally receive a delegate that manages the presentation of the unmask prompt UI.
 
Components: UI>Browser>Autofill>Payments UI>Browser>Autofill
Labels: -UIBrowserAutofill
Cc: mahmadi@chromium.org
Cc: -mahmadi@chromium.org
Owner: mahmadi@chromium.org
"It assumes that the web page is displayed by the root view controller (or a view
controller it contains), which isn't guaranteed. ... There isn't a singleton object that can tell any arbitrary view controller how it should be presented, and you should never code under the assumption that there is. The purpose of the coordinator pattern is to abstract away view controller relationships so that the object that determines how a view controller is presented is decoupled from the view controllers themselves."
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments
Status: Assigned (was: Available)
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01c8891fe0ae0c258b1cbd60924aa6eb912a6771

commit 01c8891fe0ae0c258b1cbd60924aa6eb912a6771
Author: edchin <edchin@chromium.org>
Date: Fri Jan 26 16:45:01 2018

[ios] Remove use of rootViewController from autofill

[UIApplication sharedApplication].keyWindow.rootViewController was
used to present UI. Now, the appropriate view controller is
plumbed into autofill to present UI.

Bug: 791793,  692525 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: If82b5a5ee37d2ea9778d0332dd6686949d6bbfab
Reviewed-on: https://chromium-review.googlesource.com/882400
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531991}
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/autofill/autofill_controller.h
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/autofill/autofill_controller.mm
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/autofill/autofill_tab_helper.h
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/autofill/autofill_tab_helper.mm
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.mm
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/01c8891fe0ae0c258b1cbd60924aa6eb912a6771/ios/chrome/browser/ui/payments/full_card_requester.mm

Comment 7 by edchin@chromium.org, Jan 26 2018

Status: Fixed (was: Assigned)

Sign in to add a comment