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/credential_manager_impl.h" | 5 #include "components/password_manager/content/browser/credential_manager_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 PasswordManagerClient* CredentialManagerImpl::client() const { | 257 PasswordManagerClient* CredentialManagerImpl::client() const { |
258 return client_; | 258 return client_; |
259 } | 259 } |
260 | 260 |
261 autofill::PasswordForm CredentialManagerImpl::GetSynthesizedFormForOrigin() | 261 autofill::PasswordForm CredentialManagerImpl::GetSynthesizedFormForOrigin() |
262 const { | 262 const { |
263 autofill::PasswordForm synthetic_form; | 263 autofill::PasswordForm synthetic_form; |
264 synthetic_form.origin = web_contents()->GetLastCommittedURL().GetOrigin(); | 264 synthetic_form.origin = web_contents()->GetLastCommittedURL().GetOrigin(); |
265 synthetic_form.signon_realm = synthetic_form.origin.spec(); | 265 synthetic_form.signon_realm = synthetic_form.origin.spec(); |
266 synthetic_form.scheme = autofill::PasswordForm::SCHEME_HTML; | 266 synthetic_form.scheme = autofill::PasswordForm::SCHEME_HTML; |
267 synthetic_form.ssl_valid = synthetic_form.origin.SchemeIsCryptographic() && | |
268 !client_->DidLastPageLoadEncounterSSLErrors(); | |
269 return synthetic_form; | 267 return synthetic_form; |
270 } | 268 } |
271 | 269 |
272 void CredentialManagerImpl::DoneRequiringUserMediation() { | 270 void CredentialManagerImpl::DoneRequiringUserMediation() { |
273 DCHECK(pending_require_user_mediation_); | 271 DCHECK(pending_require_user_mediation_); |
274 pending_require_user_mediation_.reset(); | 272 pending_require_user_mediation_.reset(); |
275 } | 273 } |
276 | 274 |
277 bool CredentialManagerImpl::IsUpdatingCredentialAllowed() const { | 275 bool CredentialManagerImpl::IsUpdatingCredentialAllowed() const { |
278 return !client_->DidLastPageLoadEncounterSSLErrors() && | 276 return !client_->DidLastPageLoadEncounterSSLErrors() && |
279 !client_->IsOffTheRecord(); | 277 !client_->IsOffTheRecord(); |
280 } | 278 } |
281 | 279 |
282 } // namespace password_manager | 280 } // namespace password_manager |
OLD | NEW |