OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/autofill/core/browser/autofill_save_card_infobar_delegate_m
obile.h" | 5 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m
obile.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 AutofillSaveCardInfoBarDelegateMobile:: | 49 AutofillSaveCardInfoBarDelegateMobile:: |
50 ~AutofillSaveCardInfoBarDelegateMobile() { | 50 ~AutofillSaveCardInfoBarDelegateMobile() { |
51 if (!had_user_interaction_) | 51 if (!had_user_interaction_) |
52 LogUserAction(AutofillMetrics::INFOBAR_IGNORED); | 52 LogUserAction(AutofillMetrics::INFOBAR_IGNORED); |
53 } | 53 } |
54 | 54 |
55 void AutofillSaveCardInfoBarDelegateMobile::OnLegalMessageLinkClicked( | 55 void AutofillSaveCardInfoBarDelegateMobile::OnLegalMessageLinkClicked( |
56 GURL url) { | 56 GURL url) { |
57 infobar()->owner()->OpenURL(url, NEW_FOREGROUND_TAB); | 57 infobar()->owner()->OpenURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB); |
58 } | 58 } |
59 | 59 |
60 int AutofillSaveCardInfoBarDelegateMobile::GetIconId() const { | 60 int AutofillSaveCardInfoBarDelegateMobile::GetIconId() const { |
61 return IDR_INFOBAR_AUTOFILL_CC; | 61 return IDR_INFOBAR_AUTOFILL_CC; |
62 } | 62 } |
63 | 63 |
64 base::string16 AutofillSaveCardInfoBarDelegateMobile::GetMessageText() const { | 64 base::string16 AutofillSaveCardInfoBarDelegateMobile::GetMessageText() const { |
65 return l10n_util::GetStringUTF16( | 65 return l10n_util::GetStringUTF16( |
66 upload_ ? IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD | 66 upload_ ? IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD |
67 : IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL); | 67 : IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 void AutofillSaveCardInfoBarDelegateMobile::LogUserAction( | 119 void AutofillSaveCardInfoBarDelegateMobile::LogUserAction( |
120 AutofillMetrics::InfoBarMetric user_action) { | 120 AutofillMetrics::InfoBarMetric user_action) { |
121 DCHECK(!had_user_interaction_); | 121 DCHECK(!had_user_interaction_); |
122 | 122 |
123 AutofillMetrics::LogCreditCardInfoBarMetric(user_action); | 123 AutofillMetrics::LogCreditCardInfoBarMetric(user_action); |
124 had_user_interaction_ = true; | 124 had_user_interaction_ = true; |
125 } | 125 } |
126 | 126 |
127 } // namespace autofill | 127 } // namespace autofill |
OLD | NEW |