OLD | NEW |
1 // Copyright (c) 2011 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_delegate_impl.h" | 5 #include "chrome/browser/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 "chrome/browser/infobars/infobar_tab_helper.h" | 9 #include "chrome/browser/infobars/infobar_tab_helper.h" |
10 #include "chrome/browser/password_manager/password_form_manager.h" | 10 #include "chrome/browser/password_manager/password_form_manager.h" |
11 #include "chrome/browser/password_manager/password_manager.h" | 11 #include "chrome/browser/password_manager/password_manager.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 return true; | 109 return true; |
110 } | 110 } |
111 | 111 |
112 | 112 |
113 // PasswordManagerDelegateImpl ------------------------------------------------ | 113 // PasswordManagerDelegateImpl ------------------------------------------------ |
114 | 114 |
115 void PasswordManagerDelegateImpl::FillPasswordForm( | 115 void PasswordManagerDelegateImpl::FillPasswordForm( |
116 const webkit::forms::PasswordFormFillData& form_data) { | 116 const webkit::forms::PasswordFormFillData& form_data) { |
117 tab_contents_->web_contents()->GetRenderViewHost()->Send( | 117 tab_contents_->web_contents()->GetRenderViewHost()->Send( |
118 new AutofillMsg_FillPasswordForm( | 118 new AutofillMsg_FillPasswordForm( |
119 tab_contents_->web_contents()->GetRenderViewHost()->routing_id(), | 119 tab_contents_->web_contents()->GetRenderViewHost()->GetRoutingID(), |
120 form_data)); | 120 form_data)); |
121 } | 121 } |
122 | 122 |
123 void PasswordManagerDelegateImpl::AddSavePasswordInfoBar( | 123 void PasswordManagerDelegateImpl::AddSavePasswordInfoBar( |
124 PasswordFormManager* form_to_save) { | 124 PasswordFormManager* form_to_save) { |
125 tab_contents_->infobar_tab_helper()->AddInfoBar( | 125 tab_contents_->infobar_tab_helper()->AddInfoBar( |
126 new SavePasswordInfoBarDelegate( | 126 new SavePasswordInfoBarDelegate( |
127 tab_contents_->infobar_tab_helper(), form_to_save)); | 127 tab_contents_->infobar_tab_helper(), form_to_save)); |
128 } | 128 } |
129 | 129 |
130 Profile* PasswordManagerDelegateImpl::GetProfileForPasswordManager() { | 130 Profile* PasswordManagerDelegateImpl::GetProfileForPasswordManager() { |
131 return tab_contents_->profile(); | 131 return tab_contents_->profile(); |
132 } | 132 } |
133 | 133 |
134 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { | 134 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { |
135 content::NavigationEntry* entry = | 135 content::NavigationEntry* entry = |
136 tab_contents_->web_contents()->GetController().GetActiveEntry(); | 136 tab_contents_->web_contents()->GetController().GetActiveEntry(); |
137 if (!entry) { | 137 if (!entry) { |
138 NOTREACHED(); | 138 NOTREACHED(); |
139 return false; | 139 return false; |
140 } | 140 } |
141 | 141 |
142 return net::IsCertStatusError(entry->GetSSL().cert_status); | 142 return net::IsCertStatusError(entry->GetSSL().cert_status); |
143 } | 143 } |
OLD | NEW |