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

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 12378055: Make autofill stop depending on InfoBarService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify test Created 7 years, 10 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/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index eedeb9c4669b887955b00f59f90f27e90a04f9fe..0640029c87fc6b00d25dd89abef62335b5981a65 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -20,12 +20,10 @@
#include "base/string_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/api/infobars/infobar_service.h"
#include "chrome/browser/api/sync/profile_sync_service_base.h"
#include "chrome/browser/autofill/autocheckout/whitelist_manager.h"
#include "chrome/browser/autofill/autocheckout_manager.h"
#include "chrome/browser/autofill/autocomplete_history_manager.h"
-#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
#include "chrome/browser/autofill/autofill_country.h"
#include "chrome/browser/autofill/autofill_external_delegate.h"
#include "chrome/browser/autofill/autofill_field.h"
@@ -65,6 +63,7 @@
#include "ui/gfx/rect.h"
typedef PersonalDataManager::GUIDPair GUIDPair;
+
using base::TimeTicks;
using content::BrowserThread;
using content::RenderViewHost;
@@ -925,12 +924,14 @@ void AutofillManager::ImportFormData(const FormStructure& submitted_form) {
if (!personal_data_->ImportFormData(submitted_form, &imported_credit_card))
return;
- // If credit card information was submitted, show an infobar to offer to save
- // it.
- scoped_ptr<const CreditCard> scoped_credit_card(imported_credit_card);
- if (imported_credit_card && web_contents()) {
- AutofillCCInfoBarDelegate::Create(manager_delegate_->GetInfoBarService(),
- scoped_credit_card.release(), personal_data_, metric_logger_.get());
+ // If credit card information was submitted, we need to confirm whether to
+ // save it.
+ if (imported_credit_card) {
+ manager_delegate_->ConfirmImportCC(
+ *metric_logger_,
+ *imported_credit_card,
+ base::Bind(&PersonalDataManager::SaveImportedCreditCard,
+ base::Unretained(personal_data_), *imported_credit_card));
}
}

Powered by Google App Engine
This is Rietveld 408576698