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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 12016031: Add 'save details in chrome' checkbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change symbol names Created 7 years, 11 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/autofill/autofill_dialog_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index 018c2d5dbdb717501f355a69a169bcda32ec76f4..05b45203c0b53f9cd72844de1d529b136edbef63 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -26,6 +26,7 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
+#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "net/base/cert_status_flags.h"
#include "ui/base/l10n/l10n_util.h"
@@ -254,6 +255,10 @@ string16 AutofillDialogControllerImpl::CancelSignInText() const {
return string16(ASCIIToUTF16("Don't sign in."));
}
+string16 AutofillDialogControllerImpl::SaveLocallyText() const {
+ return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_SAVE_LOCALLY_CHECKBOX);
+}
+
const DetailInputs& AutofillDialogControllerImpl::RequestedFieldsForSection(
DialogSection section) const {
switch (section) {
@@ -673,7 +678,8 @@ void AutofillDialogControllerImpl::FillOutputForSectionWithComparator(
if (section == SECTION_CC) {
CreditCard card;
FillFormGroupFromOutputs(output, &card);
- manager->SaveImportedCreditCard(card);
+ if (view_->SaveDetailsLocally())
+ manager->SaveImportedCreditCard(card);
FillFormStructureForSection(card, 0, section, compare);
// CVC needs special-casing because the CreditCard class doesn't store
@@ -697,7 +703,8 @@ void AutofillDialogControllerImpl::FillOutputForSectionWithComparator(
// TODO(estade): we should probably edit the existing profile in the cases
// where the input data is based on an existing profile (user clicked
// "Edit" or autofill popup filled in the form).
- manager->SaveImportedProfile(profile);
+ if (view_->SaveDetailsLocally())
+ manager->SaveImportedProfile(profile);
FillFormStructureForSection(profile, 0, section, compare);
}
}
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.h ('k') | chrome/browser/ui/autofill/autofill_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698