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/password_store_default.h" | 5 #include "components/password_manager/core/browser/password_store_default.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 PasswordStoreChangeList PasswordStoreDefault::AddLoginImpl( | 34 PasswordStoreChangeList PasswordStoreDefault::AddLoginImpl( |
35 const PasswordForm& form) { | 35 const PasswordForm& form) { |
36 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 36 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
37 return login_db_->AddLogin(form); | 37 return login_db_->AddLogin(form); |
38 } | 38 } |
39 | 39 |
40 PasswordStoreChangeList PasswordStoreDefault::UpdateLoginImpl( | 40 PasswordStoreChangeList PasswordStoreDefault::UpdateLoginImpl( |
41 const PasswordForm& form) { | 41 const PasswordForm& form) { |
42 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 42 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
43 PasswordStoreChangeList changes; | 43 return login_db_->UpdateLogin(form); |
44 if (login_db_->UpdateLogin(form, NULL)) | |
45 changes.push_back(PasswordStoreChange(PasswordStoreChange::UPDATE, form)); | |
46 return changes; | |
47 } | 44 } |
48 | 45 |
49 PasswordStoreChangeList PasswordStoreDefault::RemoveLoginImpl( | 46 PasswordStoreChangeList PasswordStoreDefault::RemoveLoginImpl( |
50 const PasswordForm& form) { | 47 const PasswordForm& form) { |
51 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 48 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
52 PasswordStoreChangeList changes; | 49 PasswordStoreChangeList changes; |
53 if (login_db_->RemoveLogin(form)) | 50 if (login_db_->RemoveLogin(form)) |
54 changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form)); | 51 changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form)); |
55 return changes; | 52 return changes; |
56 } | 53 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 return login_db_->GetAutofillableLogins(forms); | 97 return login_db_->GetAutofillableLogins(forms); |
101 } | 98 } |
102 | 99 |
103 bool PasswordStoreDefault::FillBlacklistLogins( | 100 bool PasswordStoreDefault::FillBlacklistLogins( |
104 std::vector<PasswordForm*>* forms) { | 101 std::vector<PasswordForm*>* forms) { |
105 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 102 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
106 return login_db_->GetBlacklistLogins(forms); | 103 return login_db_->GetBlacklistLogins(forms); |
107 } | 104 } |
108 | 105 |
109 } // namespace password_manager | 106 } // namespace password_manager |
OLD | NEW |