| Index: chrome/browser/autofill/autofill_manager.cc
|
| ===================================================================
|
| --- chrome/browser/autofill/autofill_manager.cc (revision 51878)
|
| +++ chrome/browser/autofill/autofill_manager.cc (working copy)
|
| @@ -9,6 +9,7 @@
|
| #include "base/basictypes.h"
|
| #include "base/string16.h"
|
| #include "chrome/browser/autofill/autofill_dialog.h"
|
| +#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
|
| #include "chrome/browser/autofill/form_structure.h"
|
| #include "chrome/browser/pref_service.h"
|
| #include "chrome/browser/profile.h"
|
| @@ -402,7 +403,16 @@
|
| if (!personal_data_->ImportFormData(import, this))
|
| return;
|
|
|
| - UploadFormData();
|
| + // Did we get credit card info?
|
| + AutoFillProfile* profile;
|
| + CreditCard* credit_card;
|
| + personal_data_->GetImportedFormData(&profile, &credit_card);
|
| +
|
| + if (credit_card) {
|
| + cc_infobar_.reset(new AutoFillCCInfoBarDelegate(tab_contents_, this));
|
| + } else {
|
| + UploadFormData();
|
| + }
|
| }
|
|
|
| void AutoFillManager::UploadFormData() {
|
| @@ -412,6 +422,12 @@
|
| // form_is_autofilled);
|
| }
|
|
|
| +void AutoFillManager::OnInfoBarClosed(bool should_save) {
|
| + if (should_save)
|
| + personal_data_->SaveImportedCreditCard();
|
| + UploadFormData();
|
| +}
|
| +
|
| AutoFillManager::AutoFillManager()
|
| : tab_contents_(NULL),
|
| personal_data_(NULL),
|
|
|