[Payment Request] Enables Payment Request on iOS by default
- Sets PaymentRequestManager's active WebState to nullptr in BVC's shutdown method to make sure the active WebState is clean when BVC shuts down. - Adds a call to update PaymentRequestManager's active WebState in -tabModel:didReplaceTab:withTab:atIndex: in order to clean the the previously active WebState and enable PaymentRequest on the new one. This call happens when a recent tab is opened. - This CL adds a unit test to verify that the BVC shuts down cleanly with Payment Request enabled. - This CL removes the calls to enable/disable the active WebState in the [PaymentRequestManager enablePaymentRequest:] and instead changes the behavior so that the script commands are ignored when the Payment Request is disabled. The reason for this change is that this method is called when the BVC is disabled before it shuts down. This could result in a second attempt to disable the active WebState when the BVC actually shuts down which is wrong. TBR=rouslan@ Bug: 761358, 755799, 602666 Change-Id: Id984aec77194993b23085448cb802ba9fe120379 Reviewed-on: https://chromium-review.googlesource.com/660480 Commit-Queue: Moe Ahmadi <mahmadi@chromium.org> Reviewed-by:Mark Cogan <marq@chromium.org> Cr-Commit-Position: refs/heads/master@{#501363}
Loading
Please register or sign in to comment