| 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_dispatc
her.h" | 5 #include "components/password_manager/content/browser/credential_manager_dispatc
her.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 CredentialInfo info(*zero_click_form_to_return, | 97 CredentialInfo info(*zero_click_form_to_return, |
| 98 zero_click_form_to_return->federation_url.is_empty() | 98 zero_click_form_to_return->federation_url.is_empty() |
| 99 ? CredentialType::CREDENTIAL_TYPE_LOCAL | 99 ? CredentialType::CREDENTIAL_TYPE_LOCAL |
| 100 : CredentialType::CREDENTIAL_TYPE_FEDERATED); | 100 : CredentialType::CREDENTIAL_TYPE_FEDERATED); |
| 101 dispatcher_->SendCredential(id_, info); | 101 dispatcher_->SendCredential(id_, info); |
| 102 return; | 102 return; |
| 103 } | 103 } |
| 104 | 104 |
| 105 if (zero_click_only_ || | 105 if (zero_click_only_ || |
| 106 !dispatcher_->client()->PromptUserToChooseCredentials( | 106 !dispatcher_->client()->PromptUserToChooseCredentials( |
| 107 local_results.Pass(), federated_results.Pass(), | 107 local_results.Pass(), federated_results.Pass(), origin_, |
| 108 base::Bind(&CredentialManagerDispatcher::SendCredential, | 108 base::Bind(&CredentialManagerDispatcher::SendCredential, |
| 109 base::Unretained(dispatcher_), id_))) { | 109 base::Unretained(dispatcher_), id_))) { |
| 110 dispatcher_->SendCredential(id_, CredentialInfo()); | 110 dispatcher_->SendCredential(id_, CredentialInfo()); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 // CredentialManagerDispatcher::PendingSignedOutTask --------------------------- | 114 // CredentialManagerDispatcher::PendingSignedOutTask --------------------------- |
| 115 | 115 |
| 116 class CredentialManagerDispatcher::PendingSignedOutTask | 116 class CredentialManagerDispatcher::PendingSignedOutTask |
| 117 : public PasswordStoreConsumer { | 117 : public PasswordStoreConsumer { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 pending_request_->id(), info)); | 320 pending_request_->id(), info)); |
| 321 pending_request_.reset(); | 321 pending_request_.reset(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void CredentialManagerDispatcher::DoneSigningOut() { | 324 void CredentialManagerDispatcher::DoneSigningOut() { |
| 325 DCHECK(pending_sign_out_); | 325 DCHECK(pending_sign_out_); |
| 326 pending_sign_out_.reset(); | 326 pending_sign_out_.reset(); |
| 327 } | 327 } |
| 328 | 328 |
| 329 } // namespace password_manager | 329 } // namespace password_manager |
| OLD | NEW |