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

Side by Side Diff: chrome/browser/autofill/autofill_cc_import_confirmation_handler.cc

Issue 12378055: Make autofill stop depending on InfoBarService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #include "chrome/browser/autofill/autofill_cc_import_confirmation_handler.h"
6
7 #include "chrome/browser/autofill/autofill_metrics.h"
8 #include "chrome/browser/autofill/personal_data_manager.h"
9
10 namespace autofill {
11
12 AutofillCCImportConfirmationHandler::AutofillCCImportConfirmationHandler(
13 scoped_ptr<const CreditCard> credit_card,
14 PersonalDataManager* personal_data,
15 const AutofillMetrics* metric_logger)
16 : credit_card_(credit_card.Pass()),
17 personal_data_(personal_data),
18 metric_logger_(metric_logger) {}
19
20 AutofillCCImportConfirmationHandler::~AutofillCCImportConfirmationHandler() {}
21
22 void AutofillCCImportConfirmationHandler::DidShowConfirmation() {
23 metric_logger_->LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_SHOWN);
24 }
25
26 void AutofillCCImportConfirmationHandler::DidAccept() {
27 personal_data_->SaveImportedCreditCard(*credit_card_);
28 metric_logger_->LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_ACCEPTED);
29 }
30
31 void AutofillCCImportConfirmationHandler::DidDeny() {
32 metric_logger_->LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_DENIED);
33 }
34
35 void AutofillCCImportConfirmationHandler::DidCancel() {
36 metric_logger_->LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_DENIED);
37 }
38
39 void AutofillCCImportConfirmationHandler::DidIgnore() {
40 metric_logger_->LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_IGNORED);
41 }
42
43 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698