| 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..2b6d6df42db5c1744ca68d6996e7a53bd7e96782
|
| --- /dev/null
|
| +++ b/chrome/browser/autofill/autofill_cc_import_confirmation_handler.h
|
| @@ -0,0 +1,49 @@
|
| +// 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 "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/autofill/autofill_cc_import_confirmation_delegate.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 DidShow() OVERRIDE;
|
| + virtual void DidAccept() OVERRIDE;
|
| + virtual void DidCancel() OVERRIDE;
|
| + virtual void DidDismiss() OVERRIDE;
|
| +
|
| + 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.
|
| +
|
| + // Did the user ever explicitly accept, deny or dismiss this infobar?
|
| + bool had_user_interaction_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AutofillCCImportConfirmationHandler);
|
| +};
|
| +
|
| +} // namespace autofill
|
| +
|
| +#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_IMPORT_CONFIRMATION_HANDLER_H_
|
|
|