Index: chrome/browser/ui/autofill/chrome_autofill_client.cc |
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
index 0a053e67891750e71cf805bfc2bf96ec93b81158..0aa1257392555d9514871496052242d642a2edd0 100644 |
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc |
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
@@ -6,7 +6,6 @@ |
#include "base/logging.h" |
#include "base/prefs/pref_service.h" |
-#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
#include "chrome/browser/autofill/personal_data_manager_factory.h" |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/password_manager/chrome_password_manager_client.h" |
@@ -24,7 +23,9 @@ |
#include "chrome/common/url_constants.h" |
#include "components/autofill/content/browser/content_autofill_driver.h" |
#include "components/autofill/content/common/autofill_messages.h" |
+#include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" |
#include "components/autofill/core/common/autofill_pref_names.h" |
+#include "components/infobars/core/infobar.h" |
#include "components/password_manager/content/browser/content_password_manager_driver.h" |
#include "content/public/browser/render_view_host.h" |
#include "ui/gfx/rect.h" |
@@ -119,11 +120,15 @@ void ChromeAutofillClient::OnUnmaskResponse(const base::string16& response) { |
NOTIMPLEMENTED() << " I should probably do something with this: " << response; |
} |
+infobars::InfoBarManager* ChromeAutofillClient::GetInfoBarManager() { |
+ return InfoBarService::FromWebContents(web_contents()); |
+} |
+ |
void ChromeAutofillClient::ConfirmSaveCreditCard( |
+ AutofillManager* autofill_manager, |
const base::Closure& save_card_callback) { |
- InfoBarService* infobar_service = |
- InfoBarService::FromWebContents(web_contents()); |
- AutofillCCInfoBarDelegate::Create(infobar_service, save_card_callback); |
+ AutofillCCInfoBarDelegate::Create(GetInfoBarManager(), autofill_manager, |
+ save_card_callback); |
} |
Ilya Sherman
2014/12/12 22:24:21
Can you remove the AutofillClient::ConfirmSaveCred
Pritam Nikam
2014/12/15 11:16:14
Done.
|
bool ChromeAutofillClient::HasCreditCardScanFeature() { |
@@ -240,4 +245,9 @@ void ChromeAutofillClient::OnFirstUserGestureObserved() { |
new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); |
} |
+scoped_ptr<infobars::InfoBar> ChromeAutofillClient::CreateInfoBar( |
+ scoped_ptr<ConfirmInfoBarDelegate> delegate) { |
+ return ConfirmInfoBarDelegate::CreateInfoBar(delegate.Pass()); |
+} |
+ |
} // namespace autofill |