OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/password_manager/content_password_manager_driver.h" |
| 6 |
| 7 #include "components/autofill/content/common/autofill_messages.h" |
| 8 #include "components/autofill/core/common/password_form.h" |
| 9 #include "content/public/browser/navigation_details.h" |
| 10 #include "content/public/browser/navigation_entry.h" |
| 11 #include "content/public/browser/render_view_host.h" |
| 12 #include "content/public/browser/web_contents.h" |
| 13 #include "content/public/common/page_transition_types.h" |
| 14 #include "content/public/common/ssl_status.h" |
| 15 #include "net/cert/cert_status_flags.h" |
| 16 |
| 17 ContentPasswordManagerDriver::ContentPasswordManagerDriver( |
| 18 content::WebContents* web_contents) |
| 19 : web_contents_(web_contents) { |
| 20 } |
| 21 |
| 22 ContentPasswordManagerDriver::~ContentPasswordManagerDriver() { |
| 23 } |
| 24 |
| 25 void ContentPasswordManagerDriver::FillPasswordForm( |
| 26 const autofill::PasswordFormFillData& form_data) { |
| 27 web_contents_->GetRenderViewHost()->Send( |
| 28 new AutofillMsg_FillPasswordForm( |
| 29 web_contents_->GetRenderViewHost()->GetRoutingID(), |
| 30 form_data)); |
| 31 } |
| 32 |
| 33 bool ContentPasswordManagerDriver::DidLastPageLoadEncounterSSLErrors() { |
| 34 content::NavigationEntry* entry = |
| 35 web_contents_->GetController().GetActiveEntry(); |
| 36 if (!entry) { |
| 37 NOTREACHED(); |
| 38 return false; |
| 39 } |
| 40 |
| 41 return net::IsCertStatusError(entry->GetSSL().cert_status); |
| 42 } |
OLD | NEW |