| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_IMPORT_CONFIRMATION_HANDLER_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_IMPORT_CONFIRMATION_HANDLER_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/autofill/autofill_cc_import_confirmation_delegate.h" |
| 10 |
| 11 class AutofillMetrics; |
| 12 class CreditCard; |
| 13 class PersonalDataManager; |
| 14 |
| 15 namespace autofill { |
| 16 |
| 17 class AutofillCCImportConfirmationHandler |
| 18 : public AutofillCCImportConfirmationDelegate { |
| 19 public: |
| 20 AutofillCCImportConfirmationHandler(scoped_ptr<const CreditCard> credit_card, |
| 21 PersonalDataManager* personal_data, |
| 22 const AutofillMetrics* metric_logger); |
| 23 virtual ~AutofillCCImportConfirmationHandler(); |
| 24 |
| 25 // AutofillCCImportConfirmationDelegate implementation: |
| 26 virtual void DidShow() OVERRIDE; |
| 27 virtual void DidAccept() OVERRIDE; |
| 28 virtual void DidCancel() OVERRIDE; |
| 29 virtual void DidDismiss() OVERRIDE; |
| 30 |
| 31 private: |
| 32 // The credit card that should be saved if the user accepts the infobar. |
| 33 scoped_ptr<const CreditCard> credit_card_; |
| 34 |
| 35 // The personal data manager to which the credit card should be saved. |
| 36 PersonalDataManager* personal_data_; // Weak. |
| 37 |
| 38 // For logging UMA metrics. |
| 39 const AutofillMetrics* metric_logger_; // Weak. |
| 40 |
| 41 // Did the user ever explicitly accept, deny or dismiss this infobar? |
| 42 bool had_user_interaction_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(AutofillCCImportConfirmationHandler); |
| 45 }; |
| 46 |
| 47 } // namespace autofill |
| 48 |
| 49 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_IMPORT_CONFIRMATION_HANDLER_H_ |
| OLD | NEW |