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/native_backend_kwallet_x.h" | 5 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 delete_begin, delete_end, CREATION_TIMESTAMP, changes); | 495 delete_begin, delete_end, CREATION_TIMESTAMP, changes); |
496 } | 496 } |
497 | 497 |
498 bool NativeBackendKWallet::RemoveLoginsSyncedBetween( | 498 bool NativeBackendKWallet::RemoveLoginsSyncedBetween( |
499 base::Time delete_begin, | 499 base::Time delete_begin, |
500 base::Time delete_end, | 500 base::Time delete_end, |
501 password_manager::PasswordStoreChangeList* changes) { | 501 password_manager::PasswordStoreChangeList* changes) { |
502 return RemoveLoginsBetween(delete_begin, delete_end, SYNC_TIMESTAMP, changes); | 502 return RemoveLoginsBetween(delete_begin, delete_end, SYNC_TIMESTAMP, changes); |
503 } | 503 } |
504 | 504 |
505 bool NativeBackendKWallet::DisableAutoSignInForAllLogins( | 505 bool NativeBackendKWallet::DisableAutoSignInForOrigins( |
| 506 const base::Callback<bool(const GURL&)>& origin_filter, |
506 password_manager::PasswordStoreChangeList* changes) { | 507 password_manager::PasswordStoreChangeList* changes) { |
507 ScopedVector<autofill::PasswordForm> all_forms; | 508 ScopedVector<autofill::PasswordForm> all_forms; |
508 if (!GetAllLogins(&all_forms)) | 509 if (!GetAllLogins(&all_forms)) |
509 return false; | 510 return false; |
510 | 511 |
511 for (auto& form : all_forms) { | 512 for (auto& form : all_forms) { |
512 if (!form->skip_zero_click) { | 513 if (origin_filter.Run(form->origin) && !form->skip_zero_click) { |
513 form->skip_zero_click = true; | 514 form->skip_zero_click = true; |
514 if (!UpdateLogin(*form, changes)) | 515 if (!UpdateLogin(*form, changes)) |
515 return false; | 516 return false; |
516 } | 517 } |
517 } | 518 } |
518 return true; | 519 return true; |
519 } | 520 } |
520 | 521 |
521 bool NativeBackendKWallet::GetLogins( | 522 bool NativeBackendKWallet::GetLogins( |
522 const PasswordForm& form, | 523 const PasswordForm& form, |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 } | 827 } |
827 | 828 |
828 return handle; | 829 return handle; |
829 } | 830 } |
830 | 831 |
831 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const { | 832 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const { |
832 // Originally, the folder name was always just "Chrome Form Data". | 833 // Originally, the folder name was always just "Chrome Form Data". |
833 // Now we use it to distinguish passwords for different profiles. | 834 // Now we use it to distinguish passwords for different profiles. |
834 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_); | 835 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_); |
835 } | 836 } |
OLD | NEW |