OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/password_manager/save_password_infobar_delegate.h" | 5 #include "chrome/browser/password_manager/save_password_infobar_delegate.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "chrome/browser/infobars/infobar_service.h" | 8 #include "chrome/browser/infobars/infobar_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/passwords/password_bubble_experiment.h" | 10 #include "chrome/browser/ui/passwords/password_bubble_experiment.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 SavePasswordInfoBarDelegate::GetInfoBarAutomationType() const { | 126 SavePasswordInfoBarDelegate::GetInfoBarAutomationType() const { |
127 return PASSWORD_INFOBAR; | 127 return PASSWORD_INFOBAR; |
128 } | 128 } |
129 | 129 |
130 int SavePasswordInfoBarDelegate::GetIconID() const { | 130 int SavePasswordInfoBarDelegate::GetIconID() const { |
131 return IDR_INFOBAR_SAVE_PASSWORD; | 131 return IDR_INFOBAR_SAVE_PASSWORD; |
132 } | 132 } |
133 | 133 |
134 bool SavePasswordInfoBarDelegate::ShouldExpire( | 134 bool SavePasswordInfoBarDelegate::ShouldExpire( |
135 const NavigationDetails& details) const { | 135 const NavigationDetails& details) const { |
136 return !details.is_redirect && | 136 return !details.is_redirect && ConfirmInfoBarDelegate::ShouldExpire(details); |
137 infobars::InfoBarDelegate::ShouldExpire(details); | |
138 } | 137 } |
139 | 138 |
140 void SavePasswordInfoBarDelegate::InfoBarDismissed() { | 139 void SavePasswordInfoBarDelegate::InfoBarDismissed() { |
141 DCHECK(form_to_save_.get()); | 140 DCHECK(form_to_save_.get()); |
142 infobar_response_ = password_manager::metrics_util::INFOBAR_DISMISSED; | 141 infobar_response_ = password_manager::metrics_util::INFOBAR_DISMISSED; |
143 } | 142 } |
144 | 143 |
145 base::string16 SavePasswordInfoBarDelegate::GetMessageText() const { | 144 base::string16 SavePasswordInfoBarDelegate::GetMessageText() const { |
146 return title_; | 145 return title_; |
147 } | 146 } |
(...skipping 28 matching lines...) Expand all Loading... |
176 WindowOpenDisposition disposition) { | 175 WindowOpenDisposition disposition) { |
177 InfoBarService::WebContentsFromInfoBar(infobar()) | 176 InfoBarService::WebContentsFromInfoBar(infobar()) |
178 ->OpenURL(content::OpenURLParams( | 177 ->OpenURL(content::OpenURLParams( |
179 GURL(l10n_util::GetStringUTF16( | 178 GURL(l10n_util::GetStringUTF16( |
180 IDS_PASSWORD_MANAGER_SMART_LOCK_ARTICLE)), | 179 IDS_PASSWORD_MANAGER_SMART_LOCK_ARTICLE)), |
181 content::Referrer(), | 180 content::Referrer(), |
182 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 181 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
183 ui::PAGE_TRANSITION_LINK, false)); | 182 ui::PAGE_TRANSITION_LINK, false)); |
184 return true; | 183 return true; |
185 } | 184 } |
OLD | NEW |