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

Unified Diff: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm

Issue 1038043003: Autofill OSX: Disable inputs and Verify button after permanent error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cup_13_upstream_09_12_10_applied_01
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
diff --git a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
index 6a1aa5695463f5c4922ef6db1d42854cddcd7c4a..365c888998652561f421558e71384ed3d1b9f42d 100644
--- a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
@@ -199,6 +199,13 @@ void CardUnmaskPromptViewBridge::PerformClose() {
[self updateVerifyButtonEnabled];
}
+- (void)setInputsEnabled:(BOOL)enabled {
bondd 2015/03/26 19:50:06 Only ever called with enabled == NO. I could renam
groby-ooo-7-16 2015/03/26 20:17:45 No, I'd leave it, for API symmetry. If you leave t
bondd 2015/03/26 20:33:12 We want to leave the Cancel button enabled.
bondd 2015/03/26 20:46:52 Also, unless I'm missing something this will give
+ [cvcInput_ setEnabled:enabled];
+ [monthPopup_ setEnabled:enabled];
+ [yearPopup_ setEnabled:enabled];
+ [storageCheckbox_ setEnabled:enabled];
+}
+
- (void)setRetriableErrorMessage:(const base::string16&)text {
NSAttributedString* attributedString =
constrained_window::GetAttributedLabelString(
@@ -235,11 +242,14 @@ void CardUnmaskPromptViewBridge::PerformClose() {
}
[permanentErrorBox_ setHidden:text.empty()];
+ [self setInputsEnabled:NO];
+ [self updateVerifyButtonEnabled];
[self setRetriableErrorMessage:base::string16()];
}
- (void)updateVerifyButtonEnabled {
BOOL enable = ![inputRowView_ isHidden] &&
+ ![[permanentErrorLabel_ stringValue] length] &&
bondd 2015/03/26 19:50:06 Alternatively, this line could be "[cvcInput_ isEn
groby-ooo-7-16 2015/03/26 20:17:45 I like the current one better, because it's more g
bondd 2015/03/26 20:33:12 Acknowledged.
bridge_->GetController()->InputCvcIsValid(
base::SysNSStringToUTF16([cvcInput_ stringValue])) &&
[self expirationDateIsValid];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698