Chromium Code Reviews| Index: components/password_manager/core/browser/password_store_default.cc |
| diff --git a/components/password_manager/core/browser/password_store_default.cc b/components/password_manager/core/browser/password_store_default.cc |
| index 79cae2a78be01cd160f1c0522dbb9c270e5c0b6a..4dfe5159542640e9bc8d4a651e43f4445392fe41 100644 |
| --- a/components/password_manager/core/browser/password_store_default.cc |
| +++ b/components/password_manager/core/browser/password_store_default.cc |
| @@ -135,16 +135,20 @@ PasswordStoreChangeList PasswordStoreDefault::RemoveLoginsSyncedBetweenImpl( |
| return changes; |
| } |
| -PasswordStoreChangeList |
| -PasswordStoreDefault::DisableAutoSignInForAllLoginsImpl() { |
| +PasswordStoreChangeList PasswordStoreDefault::DisableAutoSignInForOriginsImpl( |
| + const base::Callback<bool(const GURL&)>& origin_filter) { |
| ScopedVector<autofill::PasswordForm> forms; |
| PasswordStoreChangeList changes; |
| if (login_db_ && login_db_->GetAutoSignInLogins(&forms)) { |
| - if (login_db_->DisableAutoSignInForAllLogins()) { |
| - for (const auto* form : forms) { |
| - changes.push_back( |
| - PasswordStoreChange(PasswordStoreChange::UPDATE, *form)); |
| - } |
| + for (const auto* form : forms) { |
| + if (!origin_filter.Run(form->origin)) |
| + continue; |
| + |
| + if (!login_db_->DisableAutoSignInForOrigin(form->origin)) |
|
vabr (Chromium)
2016/07/08 19:22:03
This looks rather inefficient. Did you consider ju
msramek
2016/07/11 13:09:17
Indeed, I did the change with the expectation that
|
| + continue; |
| + |
| + changes.push_back( |
| + PasswordStoreChange(PasswordStoreChange::UPDATE, *form)); |
| } |
| } |
| return changes; |