OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" | 5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/infobars/infobar_service.h" | 8 #include "chrome/browser/infobars/infobar_service.h" |
9 #include "components/autofill/core/browser/credit_card.h" | 9 #include "components/autofill/core/browser/credit_card.h" |
10 #include "components/autofill/core/browser/personal_data_manager.h" | 10 #include "components/autofill/core/browser/personal_data_manager.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 metric_logger_->LogCreditCardInfoBarMetric(user_action); | 52 metric_logger_->LogCreditCardInfoBarMetric(user_action); |
53 had_user_interaction_ = true; | 53 had_user_interaction_ = true; |
54 } | 54 } |
55 | 55 |
56 void AutofillCCInfoBarDelegate::InfoBarDismissed() { | 56 void AutofillCCInfoBarDelegate::InfoBarDismissed() { |
57 LogUserAction(AutofillMetrics::INFOBAR_DENIED); | 57 LogUserAction(AutofillMetrics::INFOBAR_DENIED); |
58 } | 58 } |
59 | 59 |
60 int AutofillCCInfoBarDelegate::GetIconID() const { | 60 int AutofillCCInfoBarDelegate::GetIconID() const { |
61 return IDR_INFOBAR_AUTOFILL; | 61 return IDR_INFOBAR_AUTOFILL_CC; |
62 } | 62 } |
63 | 63 |
64 infobars::InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() | 64 infobars::InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() |
65 const { | 65 const { |
66 return PAGE_ACTION_TYPE; | 66 return PAGE_ACTION_TYPE; |
67 } | 67 } |
68 | 68 |
69 bool AutofillCCInfoBarDelegate::ShouldExpireInternal( | 69 bool AutofillCCInfoBarDelegate::ShouldExpireInternal( |
70 const NavigationDetails& details) const { | 70 const NavigationDetails& details) const { |
71 // The user has submitted a form, causing the page to navigate elsewhere. We | 71 // The user has submitted a form, causing the page to navigate elsewhere. We |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 103 bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
104 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( | 104 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( |
105 content::OpenURLParams( | 105 content::OpenURLParams( |
106 GURL(autofill::kHelpURL), content::Referrer(), | 106 GURL(autofill::kHelpURL), content::Referrer(), |
107 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 107 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
108 content::PAGE_TRANSITION_LINK, false)); | 108 content::PAGE_TRANSITION_LINK, false)); |
109 return false; | 109 return false; |
110 } | 110 } |
111 | 111 |
112 } // namespace autofill | 112 } // namespace autofill |
OLD | NEW |