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/password_manager/password_manager_delegate_impl.h" | 5 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | 10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 InfoBarDelegate::InfoBarAutomationType | 118 InfoBarDelegate::InfoBarAutomationType |
119 SavePasswordInfoBarDelegate::GetInfoBarAutomationType() const { | 119 SavePasswordInfoBarDelegate::GetInfoBarAutomationType() const { |
120 return PASSWORD_INFOBAR; | 120 return PASSWORD_INFOBAR; |
121 } | 121 } |
122 | 122 |
123 // PasswordManagerDelegateImpl ------------------------------------------------ | 123 // PasswordManagerDelegateImpl ------------------------------------------------ |
124 | 124 |
125 void PasswordManagerDelegateImpl::FillPasswordForm( | 125 void PasswordManagerDelegateImpl::FillPasswordForm( |
126 const PasswordFormFillData& form_data) { | 126 const PasswordFormFillData& form_data) { |
127 bool disable_popup = tab_contents_->autofill_manager()->HasExternalDelegate(); | 127 AutofillManager* autofill_manager = |
| 128 AutofillManager::FromWebContents(tab_contents_->web_contents()); |
| 129 bool disable_popup = autofill_manager->HasExternalDelegate(); |
128 | 130 |
129 tab_contents_->web_contents()->GetRenderViewHost()->Send( | 131 tab_contents_->web_contents()->GetRenderViewHost()->Send( |
130 new AutofillMsg_FillPasswordForm( | 132 new AutofillMsg_FillPasswordForm( |
131 tab_contents_->web_contents()->GetRenderViewHost()->GetRoutingID(), | 133 tab_contents_->web_contents()->GetRenderViewHost()->GetRoutingID(), |
132 form_data, | 134 form_data, |
133 disable_popup)); | 135 disable_popup)); |
134 } | 136 } |
135 | 137 |
136 void PasswordManagerDelegateImpl::AddSavePasswordInfoBarIfPermitted( | 138 void PasswordManagerDelegateImpl::AddSavePasswordInfoBarIfPermitted( |
137 PasswordFormManager* form_to_save) { | 139 PasswordFormManager* form_to_save) { |
(...skipping 24 matching lines...) Expand all Loading... |
162 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { | 164 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { |
163 content::NavigationEntry* entry = | 165 content::NavigationEntry* entry = |
164 tab_contents_->web_contents()->GetController().GetActiveEntry(); | 166 tab_contents_->web_contents()->GetController().GetActiveEntry(); |
165 if (!entry) { | 167 if (!entry) { |
166 NOTREACHED(); | 168 NOTREACHED(); |
167 return false; | 169 return false; |
168 } | 170 } |
169 | 171 |
170 return net::IsCertStatusError(entry->GetSSL().cert_status); | 172 return net::IsCertStatusError(entry->GetSSL().cert_status); |
171 } | 173 } |
OLD | NEW |