Description was changed from ========== [Payment Request] Refactors PaymentRequestCoordinator. Moves some logic up into PaymentRequestManager, ...
3 years, 7 months ago
(2017-05-05 20:13:12 UTC)
#2
Description was changed from
==========
[Payment Request] Refactors PaymentRequestCoordinator.
Moves some logic up into PaymentRequestManager, and other logic into
PaymentRequestMediator.
There's more to refactor, but this is a start.
BUG=602666
==========
to
==========
[Payment Request] Refactors PaymentRequestCoordinator.
Refactoring asked for in CL https://codereview.chromium.org/2844783002/.
Moves some logic up into PaymentRequestManager, and other logic into
PaymentRequestMediator.
There's more to refactor, but this is a start.
BUG=602666
==========
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2866793002/40001
3 years, 7 months ago
(2017-05-05 20:13:24 UTC)
#3
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/208708)
3 years, 7 months ago
(2017-05-05 21:20:37 UTC)
#7
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/438636)
3 years, 7 months ago
(2017-05-08 22:51:05 UTC)
#13
This is a great start, thanks for digging into this! As you continue refactoring, I ...
3 years, 7 months ago
(2017-05-09 09:00:33 UTC)
#14
This is a great start, thanks for digging into this!
As you continue refactoring, I would suggest that you consider this question:
What's the difference between the roles of the payment request manager and the
payment request mediator? Both are interfaces between the model layer and other
objects, but the distinction between them should be as clear as possible.
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
File ios/chrome/browser/ui/payments/payment_request_coordinator.h (right):
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
ios/chrome/browser/ui/payments/payment_request_coordinator.h:57: cvc:(const
base::string16&)cvc;
The rules for using initialisms and other abbreviations in Objective-C are (1)
if they are used, they should be in uppercase (URL, HTTP, etc), and (2) they
shouldn't be used unless they are very widely-understood software engineering
terms.
So I would prefer that you s/cvc/verfificationCode/.
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
File ios/chrome/browser/ui/payments/payment_request_mediator.h (right):
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
ios/chrome/browser/ui/payments/payment_request_mediator.h:16: :
NSObject<PaymentRequestViewControllerDataSource>
This is fine as-is; no need to make any change. For context, however, the
direction we're moving in is to have mediators "push" configuration into view
controllers rather than having view controllers pull it from a data source.
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
File ios/chrome/browser/ui/payments/payment_request_view_controller.h (right):
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
ios/chrome/browser/ui/payments/payment_request_view_controller.h:25: -
(NSString*)authenticatedAccountName;
On 2017/05/08 21:24:12, Moe wrote:
> Optional: You could have the data source simply return the footer text and
that
> way refactor a bunch of logic into the mediator and also get rid of
> showPaymentDataSource property.
+1, good suggestion. This can be in a follow-up CL.
macourteau
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/payments/payment_request_coordinator.h File ios/chrome/browser/ui/payments/payment_request_coordinator.h (right): https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/payments/payment_request_coordinator.h#newcode57 ios/chrome/browser/ui/payments/payment_request_coordinator.h:57: cvc:(const base::string16&)cvc; On 2017/05/09 09:00:33, marq (ping after 24h) ...
3 years, 7 months ago
(2017-05-09 15:21:53 UTC)
#15
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
File ios/chrome/browser/ui/payments/payment_request_coordinator.h (right):
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
ios/chrome/browser/ui/payments/payment_request_coordinator.h:57: cvc:(const
base::string16&)cvc;
On 2017/05/09 09:00:33, marq (ping after 24h) wrote:
> The rules for using initialisms and other abbreviations in Objective-C are (1)
> if they are used, they should be in uppercase (URL, HTTP, etc), and (2) they
> shouldn't be used unless they are very widely-understood software engineering
> terms.
>
> So I would prefer that you s/cvc/verfificationCode/.
Done.
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
File ios/chrome/browser/ui/payments/payment_request_mediator.h (right):
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
ios/chrome/browser/ui/payments/payment_request_mediator.h:16: :
NSObject<PaymentRequestViewControllerDataSource>
On 2017/05/09 09:00:33, marq (ping after 24h) wrote:
> This is fine as-is; no need to make any change. For context, however, the
> direction we're moving in is to have mediators "push" configuration into view
> controllers rather than having view controllers pull it from a data source.
Acknowledged.
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
File ios/chrome/browser/ui/payments/payment_request_view_controller.h (right):
https://codereview.chromium.org/2866793002/diff/80001/ios/chrome/browser/ui/p...
ios/chrome/browser/ui/payments/payment_request_view_controller.h:25: -
(NSString*)authenticatedAccountName;
On 2017/05/09 09:00:33, marq (ping after 24h) wrote:
> On 2017/05/08 21:24:12, Moe wrote:
> > Optional: You could have the data source simply return the footer text and
> that
> > way refactor a bunch of logic into the mediator and also get rid of
> > showPaymentDataSource property.
>
> +1, good suggestion. This can be in a follow-up CL.
Ack, will do in a follow-up CL.
macourteau
The CQ bit was checked by macourteau@chromium.org to run a CQ dry run
3 years, 7 months ago
(2017-05-09 15:21:57 UTC)
#16
lgtm https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm File ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm (right): https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm#newcode154 ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm:154: SEL selector = @selector(paymentRequestCoordinator:didCompletePaymentRequest Nit -- this formatting ...
3 years, 7 months ago
(2017-05-09 15:40:12 UTC)
#18
lgtm
https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/...
File ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm
(right):
https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/...
ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm:154: SEL
selector = @selector(paymentRequestCoordinator:didCompletePaymentRequest
Nit -- this formatting confuses me (although I'm sure clang-format likes it just
fine). Can you fit the whole selector name on one line if you break after the
"(":
SEL selector = @selector(
paymentRequestCoordinator:didCompletePaymentRequest:card:verificationCode:);
macourteau
https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm File ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm (right): https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm#newcode154 ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm:154: SEL selector = @selector(paymentRequestCoordinator:didCompletePaymentRequest On 2017/05/09 15:40:12, marq (ping ...
3 years, 7 months ago
(2017-05-09 15:48:36 UTC)
#19
https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/...
File ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm
(right):
https://codereview.chromium.org/2866793002/diff/100001/ios/chrome/browser/ui/...
ios/chrome/browser/ui/payments/payment_request_coordinator_unittest.mm:154: SEL
selector = @selector(paymentRequestCoordinator:didCompletePaymentRequest
On 2017/05/09 15:40:12, marq (ping after 24h) wrote:
> Nit -- this formatting confuses me (although I'm sure clang-format likes it
just
> fine). Can you fit the whole selector name on one line if you break after the
> "(":
>
> SEL selector = @selector(
>
paymentRequestCoordinator:didCompletePaymentRequest:card:verificationCode:);
That doesn't fit. Changed to something clearer.
macourteau
The CQ bit was checked by macourteau@chromium.org
3 years, 7 months ago
(2017-05-09 15:48:43 UTC)
#20
CQ is committing da patch. Bot data: {"patchset_id": 120001, "attempt_start_ts": 1494344923550490, "parent_rev": "83cfebca143f8af8a562d177d91c933697ab3d62", "commit_rev": "3cf9dc16046236cc9772df62de7272a3412ded0a"}
3 years, 7 months ago
(2017-05-09 19:15:55 UTC)
#23
CQ is committing da patch.
Bot data: {"patchset_id": 120001, "attempt_start_ts": 1494344923550490,
"parent_rev": "83cfebca143f8af8a562d177d91c933697ab3d62", "commit_rev":
"3cf9dc16046236cc9772df62de7272a3412ded0a"}
commit-bot: I haz the power
Description was changed from ========== [Payment Request] Refactors PaymentRequestCoordinator. Refactoring asked for in CL https://codereview.chromium.org/2844783002/. ...
3 years, 7 months ago
(2017-05-09 19:16:03 UTC)
#24
Issue 2866793002: [Payment Request] Refactors PaymentRequestCoordinator.
(Closed)
Created 3 years, 7 months ago by macourteau
Modified 3 years, 7 months ago
Reviewers: marq (ping after 24h), Moe
Base URL:
Comments: 9