Index: ios/chrome/browser/payments/payment_request_manager.mm |
diff --git a/ios/chrome/browser/payments/payment_request_manager.mm b/ios/chrome/browser/payments/payment_request_manager.mm |
index 657183145f2098c5333df7c8a8daa4518e4d0ad9..5cec27fa7e84b558a408cacdc86dff00d22d7992 100644 |
--- a/ios/chrome/browser/payments/payment_request_manager.mm |
+++ b/ios/chrome/browser/payments/payment_request_manager.mm |
@@ -15,6 +15,7 @@ |
#include "components/autofill/core/browser/personal_data_manager.h" |
#include "ios/chrome/browser/autofill/personal_data_manager_factory.h" |
#include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
+#include "ios/chrome/browser/experimental_flags.h" |
#import "ios/chrome/browser/payments/js_payment_request_manager.h" |
#import "ios/chrome/browser/payments/payment_request_coordinator.h" |
#import "ios/chrome/browser/payments/payment_request_web_state_observer.h" |
@@ -123,7 +124,6 @@ const std::string kCommandPrefix = "paymentRequest"; |
instanceOfClass:[JSPaymentRequestManager class]])); |
_webState = webState; |
_webStateObserver->ObserveWebState(webState); |
- [self enableCurrentWebState]; |
marq (ping after 24h)
2017/01/11 15:09:57
Removing this call means that the payment request
Moe
2017/01/11 16:45:19
does the JS really need to be injected when switch
|
} else { |
_webState = nullptr; |
} |
@@ -146,7 +146,6 @@ const std::string kCommandPrefix = "paymentRequest"; |
[self dismissUI]; |
} |
_enabled = enabled; |
- [self enableCurrentWebState]; |
marq (ping after 24h)
2017/01/11 15:09:57
Removing this call means that if -enablePaymentReq
Moe
2017/01/11 16:45:19
enablePaymentRequest: gets called in BrowserViewCo
|
} |
} |
@@ -167,7 +166,7 @@ const std::string kCommandPrefix = "paymentRequest"; |
} |
- (void)enableCurrentWebState { |
- if (![self webState]) { |
+ if (![self webState] || !experimental_flags::IsPaymentRequestEnabled()) { |
marq (ping after 24h)
2017/01/11 15:09:57
I would prefer that the experimental flag gates cr
Moe
2017/01/11 16:45:19
I Agree. But I found no way of adding a command li
|
return; |
} |