| 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/core/browser/stub_password_manager_client.
h" | 5 #include "components/password_manager/core/browser/stub_password_manager_client.
h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
| 8 #include "components/password_manager/core/browser/password_form_manager.h" | 8 #include "components/password_manager/core/browser/password_form_manager.h" |
| 9 | 9 |
| 10 namespace password_manager { | 10 namespace password_manager { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const autofill::PasswordForm& form) { | 29 const autofill::PasswordForm& form) { |
| 30 return false; | 30 return false; |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool StubPasswordManagerClient::PromptUserToSavePassword( | 33 bool StubPasswordManagerClient::PromptUserToSavePassword( |
| 34 scoped_ptr<PasswordFormManager> form_to_save) { | 34 scoped_ptr<PasswordFormManager> form_to_save) { |
| 35 return false; | 35 return false; |
| 36 } | 36 } |
| 37 | 37 |
| 38 bool StubPasswordManagerClient::PromptUserToChooseCredentials( | 38 bool StubPasswordManagerClient::PromptUserToChooseCredentials( |
| 39 const std::vector<autofill::PasswordForm*>& local_forms, | 39 ScopedVector<autofill::PasswordForm> local_forms, |
| 40 const std::vector<autofill::PasswordForm*>& federated_forms, | 40 ScopedVector<autofill::PasswordForm> federated_forms, |
| 41 base::Callback<void(const password_manager::CredentialInfo&)> callback) { | 41 base::Callback<void(const password_manager::CredentialInfo&)> callback) { |
| 42 // Take ownership of all the password form objects in the forms vectors. | |
| 43 ScopedVector<autofill::PasswordForm> local_entries; | |
| 44 local_entries.assign(local_forms.begin(), local_forms.end()); | |
| 45 ScopedVector<autofill::PasswordForm> federated_entries; | |
| 46 federated_entries.assign(federated_forms.begin(), federated_forms.end()); | |
| 47 return false; | 42 return false; |
| 48 } | 43 } |
| 49 | 44 |
| 50 void StubPasswordManagerClient::AutomaticPasswordSave( | 45 void StubPasswordManagerClient::AutomaticPasswordSave( |
| 51 scoped_ptr<PasswordFormManager> saved_manager) { | 46 scoped_ptr<PasswordFormManager> saved_manager) { |
| 52 } | 47 } |
| 53 | 48 |
| 54 PrefService* StubPasswordManagerClient::GetPrefs() { | 49 PrefService* StubPasswordManagerClient::GetPrefs() { |
| 55 return NULL; | 50 return NULL; |
| 56 } | 51 } |
| 57 | 52 |
| 58 PasswordStore* StubPasswordManagerClient::GetPasswordStore() { | 53 PasswordStore* StubPasswordManagerClient::GetPasswordStore() { |
| 59 return NULL; | 54 return NULL; |
| 60 } | 55 } |
| 61 | 56 |
| 62 } // namespace password_manager | 57 } // namespace password_manager |
| OLD | NEW |