PaymentRequest JS should be injected only if PaymentRequest is enabled.

BUG=602666

Context:
1. Call to initializeWebViewForPaymentRequestI was previously moved outside of enableCurrentWebState in order to inject the script only when a URL is committed and not when enableCurrentWebState is called under other circumstances like opening the tab/switching tab etc. In enableCurrentWebState there is a check to see if PaymentRequest is enabled which by moving initializeWebViewForPaymentRequest outside, it was being skipped. Therefore this CL reintroduces that.
2. Also the order of calling enableCurrentWebState and initializeWebViewForPaymentRequest in CRWWebStateObserver method had to be changed so that the DCHECK(_webStateEnabled) won't fail.

Review-Url: https://codereview.chromium.org/2630423002
Cr-Commit-Position: refs/heads/master@{#443936}
1 file changed