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

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

Issue 49093008: [rAc OSX] Return CVC data from Autofill dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
Index: chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
index 8c1978a3dec4d7f3871fb9e0a4c4b3f8e2b4f1f5..0ac919871a01f9ef740f0d6c9cf3156259b4916a 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
@@ -131,7 +131,7 @@ void AutofillDialogCocoa::GetUserInput(DialogSection section,
}
string16 AutofillDialogCocoa::GetCvc() {
- return string16();
+ return base::SysNSStringToUTF16([sheet_delegate_ getCvc]);
}
bool AutofillDialogCocoa::HitTestInput(const DetailInput& input,
@@ -571,6 +571,16 @@ void AutofillDialogCocoa::OnConstrainedWindowClosed(
[[mainContainer_ sectionForId:section] getInputs:output];
}
+- (NSString*)getCvc {
+ autofill::DialogSection section = autofill::SECTION_CC;
+ NSString* value = [[mainContainer_ sectionForId:section] suggestionText];
+ if (!value) {
+ section = autofill::SECTION_CC_BILLING;
+ value = [[mainContainer_ sectionForId:section] suggestionText];
+ }
+ return value;
+}
+
- (BOOL)saveDetailsLocally {
return [mainContainer_ saveDetailsLocally];
}

Powered by Google App Engine
This is Rietveld 408576698