| 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/metrics/user_metrics.h" | 10 #include "base/metrics/user_metrics.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 base::RecordAction( | 257 base::RecordAction( |
| 258 base::UserMetricsAction("CredentialManager_AccountChooser_Dismissed")); | 258 base::UserMetricsAction("CredentialManager_AccountChooser_Dismissed")); |
| 259 } | 259 } |
| 260 SendCredential(send_callback, info); | 260 SendCredential(send_callback, info); |
| 261 } | 261 } |
| 262 | 262 |
| 263 PasswordManagerClient* CredentialManagerImpl::client() const { | 263 PasswordManagerClient* CredentialManagerImpl::client() const { |
| 264 return client_; | 264 return client_; |
| 265 } | 265 } |
| 266 | 266 |
| 267 autofill::PasswordForm CredentialManagerImpl::GetSynthesizedFormForOrigin() | 267 PasswordStore::FormDigest CredentialManagerImpl::GetSynthesizedFormForOrigin() |
| 268 const { | 268 const { |
| 269 autofill::PasswordForm synthetic_form; | 269 PasswordStore::FormDigest digest = { |
| 270 synthetic_form.origin = web_contents()->GetLastCommittedURL().GetOrigin(); | 270 autofill::PasswordForm::SCHEME_HTML, std::string(), |
| 271 synthetic_form.signon_realm = synthetic_form.origin.spec(); | 271 web_contents()->GetLastCommittedURL().GetOrigin()}; |
| 272 synthetic_form.scheme = autofill::PasswordForm::SCHEME_HTML; | 272 digest.signon_realm = digest.origin.spec(); |
| 273 return synthetic_form; | 273 return digest; |
| 274 } | 274 } |
| 275 | 275 |
| 276 void CredentialManagerImpl::DoneRequiringUserMediation() { | 276 void CredentialManagerImpl::DoneRequiringUserMediation() { |
| 277 DCHECK(pending_require_user_mediation_); | 277 DCHECK(pending_require_user_mediation_); |
| 278 pending_require_user_mediation_.reset(); | 278 pending_require_user_mediation_.reset(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 bool CredentialManagerImpl::IsUpdatingCredentialAllowed() const { | 281 bool CredentialManagerImpl::IsUpdatingCredentialAllowed() const { |
| 282 return !client_->DidLastPageLoadEncounterSSLErrors() && | 282 return !client_->DidLastPageLoadEncounterSSLErrors() && |
| 283 !client_->IsOffTheRecord(); | 283 !client_->IsOffTheRecord(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace password_manager | 286 } // namespace password_manager |
| OLD | NEW |