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

Unified Diff: ios/chrome/browser/payments/payment_request_manager.mm

Issue 2588913002: EarlGrey tests for Payment Request (base CL) (Closed)
Patch Set: Moved everything except the egtest upsream Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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];
Justin Donnelly 2016/12/29 18:36:57 I'm skeptical that this is ok. The web state has a
Moe 2017/01/06 16:16:27 lpromero@ I was wondering if you had any feedback
lpromero 2017/01/06 16:20:01 eugenebut@ would probably be the right person to a
Moe 2017/01/06 16:25:21 eugenebut@ could please chime in?
Eugene But (OOO till 7-30) 2017/01/06 17:36:22 I don't know what |enableCurrentWebState| does. Th
Justin Donnelly 2017/01/06 18:21:07 I copied the existing pattern of calls and state t
marq (ping after 24h) 2017/01/09 17:55:38 I'll have to look over it carefully; the use cases
} else {
_webState = nullptr;
}
@@ -146,7 +146,6 @@ const std::string kCommandPrefix = "paymentRequest";
[self dismissUI];
}
_enabled = enabled;
- [self enableCurrentWebState];
}
}
@@ -167,7 +166,7 @@ const std::string kCommandPrefix = "paymentRequest";
}
- (void)enableCurrentWebState {
- if (![self webState]) {
+ if (![self webState] || !experimental_flags::IsPaymentRequestEnabled()) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698