Index: components/autofill/core/browser/autofill_assist_infobar_delegate_mobile.h |
diff --git a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h b/components/autofill/core/browser/autofill_assist_infobar_delegate_mobile.h |
similarity index 55% |
copy from components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h |
copy to components/autofill/core/browser/autofill_assist_infobar_delegate_mobile.h |
index d507696c7370fd9e4e559d639b01c48cfe7be431..465da7e29a312a85ede46cf2ebf460174672172a 100644 |
--- a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h |
+++ b/components/autofill/core/browser/autofill_assist_infobar_delegate_mobile.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_SAVE_CARD_INFOBAR_DELEGATE_MOBILE_H_ |
-#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_SAVE_CARD_INFOBAR_DELEGATE_MOBILE_H_ |
+#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ASSIST_INFOBAR_DELEGATE_MOBILE_H_ |
+#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ASSIST_INFOBAR_DELEGATE_MOBILE_H_ |
#include <memory> |
@@ -11,41 +11,28 @@ |
#include "base/macros.h" |
#include "base/strings/string16.h" |
#include "components/autofill/core/browser/autofill_metrics.h" |
-#include "components/autofill/core/browser/legal_message_line.h" |
#include "components/infobars/core/confirm_infobar_delegate.h" |
-namespace base { |
-class DictionaryValue; |
-} |
- |
namespace autofill { |
class CreditCard; |
-// An InfoBarDelegate that enables the user to allow or deny storing credit |
-// card information gathered from a form submission. Only used on mobile. |
-class AutofillSaveCardInfoBarDelegateMobile : public ConfirmInfoBarDelegate { |
+// An InfoBarDelegate that enables the user to allow or deny filling credit |
+// card information on a website form. Only used on mobile. |
+class AutofillAssistInfoBarDelegateMobile : public ConfirmInfoBarDelegate { |
public: |
- AutofillSaveCardInfoBarDelegateMobile( |
- bool upload, |
- const CreditCard& card, |
- std::unique_ptr<base::DictionaryValue> legal_message, |
- const base::Closure& save_card_callback); |
+ AutofillAssistInfoBarDelegateMobile(const CreditCard& card, |
+ const base::Closure& assist_callback); |
- ~AutofillSaveCardInfoBarDelegateMobile() override; |
+ ~AutofillAssistInfoBarDelegateMobile() override; |
int issuer_icon_id() const { return issuer_icon_id_; } |
const base::string16& card_label() const { return card_label_; } |
const base::string16& card_sub_label() const { return card_sub_label_; } |
- const LegalMessageLines& legal_messages() const { return legal_messages_; } |
- |
- // Called when a link in the legal message text was clicked. |
- void OnLegalMessageLinkClicked(GURL url); |
// ConfirmInfoBarDelegate: |
int GetIconId() const override; |
base::string16 GetMessageText() const override; |
- base::string16 GetLinkText() const override; |
Type GetInfoBarType() const override; |
infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
bool ShouldExpire(const NavigationDetails& details) const override; |
@@ -53,16 +40,12 @@ class AutofillSaveCardInfoBarDelegateMobile : public ConfirmInfoBarDelegate { |
base::string16 GetButtonLabel(InfoBarButton button) const override; |
bool Accept() override; |
bool Cancel() override; |
- GURL GetLinkURL() const override; |
private: |
void LogUserAction(AutofillMetrics::InfoBarMetric user_action); |
- // Whether the action is an upload or a local save. |
- bool upload_; |
- |
// The callback to save credit card if the user accepts the infobar. |
- base::Closure save_card_callback_; |
+ base::Closure assist_callback_; |
// Did the user ever explicitly accept or dismiss this infobar? |
bool had_user_interaction_; |
@@ -76,12 +59,9 @@ class AutofillSaveCardInfoBarDelegateMobile : public ConfirmInfoBarDelegate { |
// The sub-label for the card to show in the content of the infobar. |
base::string16 card_sub_label_; |
- // The legal messages to show in the content of the infobar. |
- LegalMessageLines legal_messages_; |
- |
- DISALLOW_COPY_AND_ASSIGN(AutofillSaveCardInfoBarDelegateMobile); |
+ DISALLOW_COPY_AND_ASSIGN(AutofillAssistInfoBarDelegateMobile); |
}; |
} // namespace autofill |
-#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_SAVE_CARD_INFOBAR_DELEGATE_MOBILE_H_ |
+#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ASSIST_INFOBAR_DELEGATE_MOBILE_H_ |