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_mac.h" | 5 #include "chrome/browser/password_manager/password_store_mac.h" |
6 | 6 |
7 #include <CoreServices/CoreServices.h> | 7 #include <CoreServices/CoreServices.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 for (const auto* form : forms) { | 1236 for (const auto* form : forms) { |
1237 if (origins_updated.count(form->origin)) { | 1237 if (origins_updated.count(form->origin)) { |
1238 changes.push_back( | 1238 changes.push_back( |
1239 PasswordStoreChange(PasswordStoreChange::UPDATE, *form)); | 1239 PasswordStoreChange(PasswordStoreChange::UPDATE, *form)); |
1240 } | 1240 } |
1241 } | 1241 } |
1242 | 1242 |
1243 return changes; | 1243 return changes; |
1244 } | 1244 } |
1245 | 1245 |
1246 bool PasswordStoreMac::RemoveStatisticsCreatedBetweenImpl( | 1246 bool PasswordStoreMac::RemoveStatisticsByOriginAndTimeImpl( |
| 1247 const base::Callback<bool(const GURL&)>& origin_filter, |
1247 base::Time delete_begin, | 1248 base::Time delete_begin, |
1248 base::Time delete_end) { | 1249 base::Time delete_end) { |
1249 return login_metadata_db_ && | 1250 return login_metadata_db_ && |
1250 login_metadata_db_->stats_table().RemoveStatsBetween(delete_begin, | 1251 login_metadata_db_->stats_table().RemoveStatsByOriginAndTime( |
1251 delete_end); | 1252 origin_filter, delete_begin, delete_end); |
1252 } | 1253 } |
1253 | 1254 |
1254 std::vector<std::unique_ptr<PasswordForm>> PasswordStoreMac::FillMatchingLogins( | 1255 std::vector<std::unique_ptr<PasswordForm>> PasswordStoreMac::FillMatchingLogins( |
1255 const FormDigest& form) { | 1256 const FormDigest& form) { |
1256 chrome::ScopedSecKeychainSetUserInteractionAllowed user_interaction_allowed( | 1257 chrome::ScopedSecKeychainSetUserInteractionAllowed user_interaction_allowed( |
1257 false); | 1258 false); |
1258 | 1259 |
1259 // TODO(crbug.com/555132): "new_format" means std::vector instead of | 1260 // TODO(crbug.com/555132): "new_format" means std::vector instead of |
1260 // ScopedVector. Remove |database_forms_new_format| in favour of | 1261 // ScopedVector. Remove |database_forms_new_format| in favour of |
1261 // |database_forms| as soon as the latter is migrated to std::vector. | 1262 // |database_forms| as soon as the latter is migrated to std::vector. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 ScopedVector<PasswordForm> forms_with_keychain_entry; | 1427 ScopedVector<PasswordForm> forms_with_keychain_entry; |
1427 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, | 1428 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, |
1428 &forms_with_keychain_entry); | 1429 &forms_with_keychain_entry); |
1429 | 1430 |
1430 // Clean up any orphaned database entries. | 1431 // Clean up any orphaned database entries. |
1431 RemoveDatabaseForms(&database_forms); | 1432 RemoveDatabaseForms(&database_forms); |
1432 | 1433 |
1433 // Move the orphaned DB forms to the output parameter. | 1434 // Move the orphaned DB forms to the output parameter. |
1434 AppendSecondToFirst(orphaned_forms, &database_forms); | 1435 AppendSecondToFirst(orphaned_forms, &database_forms); |
1435 } | 1436 } |
OLD | NEW |