OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/autofill/credit_card.h" | 8 #include "chrome/browser/autofill/credit_card.h" |
9 #include "chrome/browser/autofill/personal_data_manager.h" | 9 #include "chrome/browser/autofill/personal_data_manager.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 bool AutofillCCInfoBarDelegate::Cancel() { | 79 bool AutofillCCInfoBarDelegate::Cancel() { |
80 LogUserAction(AutofillMetrics::INFOBAR_DENIED); | 80 LogUserAction(AutofillMetrics::INFOBAR_DENIED); |
81 return true; | 81 return true; |
82 } | 82 } |
83 | 83 |
84 string16 AutofillCCInfoBarDelegate::GetLinkText() const { | 84 string16 AutofillCCInfoBarDelegate::GetLinkText() const { |
85 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 85 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
86 } | 86 } |
87 | 87 |
88 bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 88 bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
| 89 #if defined(OS_ANDROID) |
| 90 // There's no link for infobars on Android. |
| 91 NOTREACHED(); |
| 92 return false; |
| 93 #else |
89 Browser* browser = BrowserList::GetLastActive(); | 94 Browser* browser = BrowserList::GetLastActive(); |
90 DCHECK(browser); | 95 DCHECK(browser); |
91 browser->OpenAutofillHelpTabAndActivate(); | 96 browser->OpenAutofillHelpTabAndActivate(); |
92 return false; | 97 return false; |
| 98 #endif // #if defined(OS_ANDROID) |
93 } | 99 } |
OLD | NEW |