| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/password_manager/password_store_x.h" | 5 #include "chrome/browser/password_manager/password_store_x.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 trash.username_value = base::ASCIIToUTF16("trash u. value"); | 99 trash.username_value = base::ASCIIToUTF16("trash u. value"); |
| 100 trash.password_element = base::ASCIIToUTF16("trash p. element"); | 100 trash.password_element = base::ASCIIToUTF16("trash p. element"); |
| 101 trash.password_value = base::ASCIIToUTF16("trash p. value"); | 101 trash.password_value = base::ASCIIToUTF16("trash p. value"); |
| 102 for (size_t i = 0; i < 3; ++i) { | 102 for (size_t i = 0; i < 3; ++i) { |
| 103 trash.origin = GURL(base::StringPrintf("http://trash%zu.com", i)); | 103 trash.origin = GURL(base::StringPrintf("http://trash%zu.com", i)); |
| 104 forms.push_back(new PasswordForm(trash)); | 104 forms.push_back(new PasswordForm(trash)); |
| 105 } | 105 } |
| 106 return forms; | 106 return forms; |
| 107 } | 107 } |
| 108 | 108 |
| 109 bool GetLogins(const PasswordForm& form, | 109 bool GetLogins(const PasswordStore::FormDigest& form, |
| 110 ScopedVector<autofill::PasswordForm>* forms) override { | 110 ScopedVector<autofill::PasswordForm>* forms) override { |
| 111 *forms = CreateTrashForms(); | 111 *forms = CreateTrashForms(); |
| 112 return false; | 112 return false; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool GetAutofillableLogins( | 115 bool GetAutofillableLogins( |
| 116 ScopedVector<autofill::PasswordForm>* forms) override { | 116 ScopedVector<autofill::PasswordForm>* forms) override { |
| 117 *forms = CreateTrashForms(); | 117 *forms = CreateTrashForms(); |
| 118 return false; | 118 return false; |
| 119 } | 119 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 return true; | 192 return true; |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool DisableAutoSignInForOrigins( | 195 bool DisableAutoSignInForOrigins( |
| 196 const base::Callback<bool(const GURL&)>& origin_filter, | 196 const base::Callback<bool(const GURL&)>& origin_filter, |
| 197 password_manager::PasswordStoreChangeList* changes) override { | 197 password_manager::PasswordStoreChangeList* changes) override { |
| 198 return true; | 198 return true; |
| 199 } | 199 } |
| 200 | 200 |
| 201 bool GetLogins(const PasswordForm& form, | 201 bool GetLogins(const PasswordStore::FormDigest& form, |
| 202 ScopedVector<autofill::PasswordForm>* forms) override { | 202 ScopedVector<autofill::PasswordForm>* forms) override { |
| 203 for (size_t i = 0; i < all_forms_.size(); ++i) | 203 for (size_t i = 0; i < all_forms_.size(); ++i) |
| 204 if (all_forms_[i].signon_realm == form.signon_realm) | 204 if (all_forms_[i].signon_realm == form.signon_realm) |
| 205 forms->push_back(new PasswordForm(all_forms_[i])); | 205 forms->push_back(new PasswordForm(all_forms_[i])); |
| 206 return true; | 206 return true; |
| 207 } | 207 } |
| 208 | 208 |
| 209 bool GetAutofillableLogins( | 209 bool GetAutofillableLogins( |
| 210 ScopedVector<autofill::PasswordForm>* forms) override { | 210 ScopedVector<autofill::PasswordForm>* forms) override { |
| 211 for (size_t i = 0; i < all_forms_.size(); ++i) | 211 for (size_t i = 0; i < all_forms_.size(); ++i) |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 | 584 |
| 585 INSTANTIATE_TEST_CASE_P(NoBackend, | 585 INSTANTIATE_TEST_CASE_P(NoBackend, |
| 586 PasswordStoreXTest, | 586 PasswordStoreXTest, |
| 587 testing::Values(NO_BACKEND)); | 587 testing::Values(NO_BACKEND)); |
| 588 INSTANTIATE_TEST_CASE_P(FailingBackend, | 588 INSTANTIATE_TEST_CASE_P(FailingBackend, |
| 589 PasswordStoreXTest, | 589 PasswordStoreXTest, |
| 590 testing::Values(FAILING_BACKEND)); | 590 testing::Values(FAILING_BACKEND)); |
| 591 INSTANTIATE_TEST_CASE_P(WorkingBackend, | 591 INSTANTIATE_TEST_CASE_P(WorkingBackend, |
| 592 PasswordStoreXTest, | 592 PasswordStoreXTest, |
| 593 testing::Values(WORKING_BACKEND)); | 593 testing::Values(WORKING_BACKEND)); |
| OLD | NEW |