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

Unified Diff: components/autofill/core/browser/autofill_assist_infobar_delegate_mobile.h

Issue 2026353002: [Autofill] Credit Card Assist Infobar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed more comments Created 4 years, 5 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: 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 {
Peter Kasting 2016/07/29 21:26:34 It's strange that the files, classes, and variable
Mathieu 2016/08/01 22:16:57 Renamed to AutofillCreditCardFillingInfoBar
public:
- AutofillSaveCardInfoBarDelegateMobile(
- bool upload,
- const CreditCard& card,
- std::unique_ptr<base::DictionaryValue> legal_message,
- const base::Closure& save_card_callback);
+ AutofillAssistInfoBarDelegateMobile(const CreditCard& card,
Peter Kasting 2016/07/29 21:26:34 Infobar delegates should not expose constructors t
Mathieu 2016/08/01 22:16:57 Done.
+ 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:
Peter Kasting 2016/07/29 21:26:34 All this stuff should be private if possible.
Mathieu 2016/08/01 22:16:57 Done, moved some to private.
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.
Peter Kasting 2016/07/29 21:26:34 Nit: card -> card information?
Mathieu 2016/08/01 22:16:57 Done.
- 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_

Powered by Google App Engine
This is Rietveld 408576698