Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1113)

Issue 2844783002: [Payment Request] Adds address normalization on iOS. (Closed)

Created:
3 years, 8 months ago by macourteau
Modified:
3 years, 7 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, rouslan+autofill_chromium.org, rogerm+autofillwatch_chromium.org, sebsg+autofillwatch_chromium.org, pkl (ping after 24h if needed), browser-components-watch_chromium.org, vabr+watchlistautofill_chromium.org, noyau+watch_chromium.org, mathp+autofillwatch_chromium.org, marq+watch_chromium.org, estade+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Payment Request] Adds address normalization on iOS. BUG=602666

Patch Set 1 #

Patch Set 2 : Adds missing new files. #

Patch Set 3 : Cleanup. #

Total comments: 27

Patch Set 4 : Rebase. #

Patch Set 5 : Addresses code review comments. #

Patch Set 6 : Adds missing dependency. #

Total comments: 12

Patch Set 7 : Addresses comments from mahmadi@. #

Total comments: 4

Patch Set 8 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -80 lines) Patch
M ios/chrome/browser/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/autofill/BUILD.gn View 1 2 3 4 5 3 chunks +4 lines, -0 lines 0 comments Download
A ios/chrome/browser/autofill/validation_rules_storage_factory.h View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A ios/chrome/browser/autofill/validation_rules_storage_factory.cc View 1 1 chunk +47 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/payments/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/ui/payments/payment_request_coordinator.mm View 1 2 3 4 5 6 7 10 chunks +249 lines, -80 lines 0 comments Download

Messages

Total messages: 25 (15 generated)
macourteau
Please take a first look through this before I add other owners. Thanks :)
3 years, 8 months ago (2017-04-26 19:52:47 UTC) #2
sebsg
Nice job! Just a couple of small comments :) https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/ui/payments/payment_request_coordinator.mm File ios/chrome/browser/ui/payments/payment_request_coordinator.mm (right): https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/ui/payments/payment_request_coordinator.mm#newcode237 ios/chrome/browser/ui/payments/payment_request_coordinator.mm:237: ...
3 years, 8 months ago (2017-04-26 20:52:51 UTC) #3
Moe
Thank you MAC! I left a few comments. https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/autofill/validation_rules_storage_factory.h File ios/chrome/browser/autofill/validation_rules_storage_factory.h (right): https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/autofill/validation_rules_storage_factory.h#newcode26 ios/chrome/browser/autofill/validation_rules_storage_factory.h:26: // ...
3 years, 7 months ago (2017-04-27 12:19:53 UTC) #4
macourteau
PTAL. https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/autofill/validation_rules_storage_factory.h File ios/chrome/browser/autofill/validation_rules_storage_factory.h (right): https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/autofill/validation_rules_storage_factory.h#newcode26 ios/chrome/browser/autofill/validation_rules_storage_factory.h:26: // chrome/browser/autofill/validation_rules_storage_factory.{cc,h}. On 2017/04/27 12:19:52, moe wrote: > ...
3 years, 7 months ago (2017-04-27 18:07:52 UTC) #5
Moe
Great work MAC! ios/.../payments lgtm % nits https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/autofill/validation_rules_storage_factory.h File ios/chrome/browser/autofill/validation_rules_storage_factory.h (right): https://codereview.chromium.org/2844783002/diff/40001/ios/chrome/browser/autofill/validation_rules_storage_factory.h#newcode26 ios/chrome/browser/autofill/validation_rules_storage_factory.h:26: // chrome/browser/autofill/validation_rules_storage_factory.{cc,h}. ...
3 years, 7 months ago (2017-04-28 09:04:44 UTC) #14
sebsg
What do you think about my suggestions for the app locale? If you don't want ...
3 years, 7 months ago (2017-04-28 13:53:29 UTC) #15
macourteau
On 2017/04/28 13:53:29, sebsg wrote: > What do you think about my suggestions for the ...
3 years, 7 months ago (2017-05-01 15:56:22 UTC) #17
macourteau
marq@chromium.org: Please provide OWNERS review. :)
3 years, 7 months ago (2017-05-01 15:56:48 UTC) #19
sebsg
Sweet! LGTM for the normalization logic
3 years, 7 months ago (2017-05-01 16:03:06 UTC) #22
marq (ping after 24h)
3 years, 7 months ago (2017-05-02 08:24:45 UTC) #25
I've made a few implementation comments, but I have two significant
observations:

- You are adding another 250+ lines of implementation to an already-large file
(payment_request_coordinator). Generally speaking the role of a coordinator
object should be to create view controllers and the model-layer objects they
need and connect them together. Coordinators themselves shouldn't need to
implement significant model-layer code. So I would strongly suggest that you
precede this CL with another one that moves as much of the model-layer business
logic as possible out of the coordinator into another object
("payment_request_mediator") ; this CL can just add code to that object.

- You are adding 250 lines of implementation and zero new unit tests. In
addition to the changes I suggest above, please break this CL into smaller
increments with unit tests at each stage.

Please feel free to contact me directly for further clarifications.

https://codereview.chromium.org/2844783002/diff/140001/ios/chrome/browser/ui/...
File ios/chrome/browser/ui/payments/payment_request_coordinator.mm (right):

https://codereview.chromium.org/2844783002/diff/140001/ios/chrome/browser/ui/...
ios/chrome/browser/ui/payments/payment_request_coordinator.mm:61: void
SetCallback(Callback callback) { callback_ = callback; }
Since there is only one callback that is used, why not just have this delegate
directly update the coordinator properties instead of making the implementation
more complicated with a callback?

https://codereview.chromium.org/2844783002/diff/140001/ios/chrome/browser/ui/...
ios/chrome/browser/ui/payments/payment_request_coordinator.mm:231: -
(void)startAddressNormalizer {
Here and elsewhere: Every method requires a comment describing what the method
does, pre/post conditions, etc.

https://codereview.chromium.org/2844783002/diff/140001/ios/chrome/browser/ui/...
ios/chrome/browser/ui/payments/payment_request_coordinator.mm:312: // Check that
PaymentRequestCoordinator still exists as |profileToNormalize|
But the delegate is a property of this coordinator object, so if the delegate
exists to execute this callback, the coordinator must as well.

https://codereview.chromium.org/2844783002/diff/140001/ios/chrome/browser/ui/...
ios/chrome/browser/ui/payments/payment_request_coordinator.mm:318:
*profileToNormalize = normalizedProfile;
Instead of updating instance variables passed in by reference, please just
directly set properties of self.

Powered by Google App Engine
This is Rietveld 408576698