Chromium Code Reviews| Index: chrome/browser/autofill/autofill_cc_import_confirmation_handler.h |
| diff --git a/chrome/browser/autofill/autofill_cc_import_confirmation_handler.h b/chrome/browser/autofill/autofill_cc_import_confirmation_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b067884bcbb1f59c70aea9af1d6fb04e2d17c113 |
| --- /dev/null |
| +++ b/chrome/browser/autofill/autofill_cc_import_confirmation_handler.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_IMPORT_CONFIRMATION_HANDLER_H_ |
| +#define CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_IMPORT_CONFIRMATION_HANDLER_H_ |
| + |
| +#include "chrome/browser/autofill/autofill_cc_import_confirmation_delegate.h" |
| + |
| +#include "base/memory/scoped_ptr.h" |
| + |
| +class AutofillMetrics; |
| +class CreditCard; |
| +class PersonalDataManager; |
| + |
| +namespace autofill { |
| + |
| +class AutofillCCImportConfirmationHandler |
| + : public AutofillCCImportConfirmationDelegate { |
| + public: |
| + AutofillCCImportConfirmationHandler(scoped_ptr<const CreditCard> credit_card, |
| + PersonalDataManager* personal_data, |
| + const AutofillMetrics* metric_logger); |
| + virtual ~AutofillCCImportConfirmationHandler(); |
| + |
| + // AutofillCCImportConfirmationDelegate implementation: |
| + virtual void DidShowConfirmation() OVERRIDE; |
|
Ilya Sherman
2013/03/04 21:07:34
nit: IMO it would be fine to go with the shorter n
kaiwang
2013/03/05 01:48:56
Done.
|
| + virtual void DidAccept() OVERRIDE; |
| + virtual void DidDeny() OVERRIDE; |
|
Ilya Sherman
2013/03/04 21:07:34
nit: IMO DidDismiss() would be a better name for t
kaiwang
2013/03/05 01:48:56
Done.
|
| + virtual void DidCancel() OVERRIDE; |
| + virtual void DidIgnore() OVERRIDE; |
|
Ilya Sherman
2013/03/04 21:07:34
Rather than DidIgnore(), define DidClose().
kaiwang
2013/03/05 01:48:56
I think it's more cleaner to just move the logic t
Ilya Sherman
2013/03/05 02:50:39
Yeah, that's fine :)
|
| + |
| + private: |
| + // The credit card that should be saved if the user accepts the infobar. |
| + scoped_ptr<const CreditCard> credit_card_; |
| + |
| + // The personal data manager to which the credit card should be saved. |
| + PersonalDataManager* personal_data_; // Weak. |
| + |
| + // For logging UMA metrics. |
| + const AutofillMetrics* metric_logger_; // Weak. |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AutofillCCImportConfirmationHandler); |
| +}; |
| + |
| +} // namespace autofill |
| + |
| +#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_IMPORT_CONFIRMATION_HANDLER_H_ |