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 "components/password_manager/content/browser/content_password_manager_d
river.h" | 5 #include "components/password_manager/content/browser/content_password_manager_d
river.h" |
6 | 6 |
7 #include "components/autofill/content/browser/content_autofill_driver.h" | 7 #include "components/autofill/content/browser/content_autofill_driver.h" |
8 #include "components/autofill/content/common/autofill_messages.h" | 8 #include "components/autofill/content/common/autofill_messages.h" |
9 #include "components/autofill/core/common/form_data.h" | 9 #include "components/autofill/core/common/form_data.h" |
10 #include "components/autofill/core/common/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 bool ContentPasswordManagerDriver::DidLastPageLoadEncounterSSLErrors() { | 82 bool ContentPasswordManagerDriver::DidLastPageLoadEncounterSSLErrors() { |
83 DCHECK(web_contents()); | 83 DCHECK(web_contents()); |
84 // TODO(vabr): This is a wrong entry to look at for HTTP basic auth, | 84 // TODO(vabr): This is a wrong entry to look at for HTTP basic auth, |
85 // http://crbug.com/388246. | 85 // http://crbug.com/388246. |
86 content::NavigationEntry* entry = | 86 content::NavigationEntry* entry = |
87 web_contents()->GetController().GetLastCommittedEntry(); | 87 web_contents()->GetController().GetLastCommittedEntry(); |
88 if (!entry) { | 88 if (!entry) { |
89 return false; | 89 return false; |
90 } | 90 } |
91 | 91 |
92 return net::IsCertStatusError(entry->GetSSL().cert_status); | 92 return net::IsCertStatusError(entry->GetSSL().cert_status) && |
| 93 !net::IsCertStatusMinorError(entry->GetSSL().cert_status); |
93 } | 94 } |
94 | 95 |
95 bool ContentPasswordManagerDriver::IsOffTheRecord() { | 96 bool ContentPasswordManagerDriver::IsOffTheRecord() { |
96 DCHECK(web_contents()); | 97 DCHECK(web_contents()); |
97 return web_contents()->GetBrowserContext()->IsOffTheRecord(); | 98 return web_contents()->GetBrowserContext()->IsOffTheRecord(); |
98 } | 99 } |
99 | 100 |
100 PasswordGenerationManager* | 101 PasswordGenerationManager* |
101 ContentPasswordManagerDriver::GetPasswordGenerationManager() { | 102 ContentPasswordManagerDriver::GetPasswordGenerationManager() { |
102 return &password_generation_manager_; | 103 return &password_generation_manager_; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return handled; | 146 return handled; |
146 } | 147 } |
147 | 148 |
148 autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { | 149 autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { |
149 autofill::ContentAutofillDriver* driver = | 150 autofill::ContentAutofillDriver* driver = |
150 autofill::ContentAutofillDriver::FromWebContents(web_contents()); | 151 autofill::ContentAutofillDriver::FromWebContents(web_contents()); |
151 return driver ? driver->autofill_manager() : NULL; | 152 return driver ? driver->autofill_manager() : NULL; |
152 } | 153 } |
153 | 154 |
154 } // namespace password_manager | 155 } // namespace password_manager |
OLD | NEW |