| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 bool PasswordStoreDefault::RemoveStatisticsCreatedBetweenImpl( | 140 bool PasswordStoreDefault::RemoveStatisticsCreatedBetweenImpl( |
| 141 base::Time delete_begin, | 141 base::Time delete_begin, |
| 142 base::Time delete_end) { | 142 base::Time delete_end) { |
| 143 return login_db_ && | 143 return login_db_ && |
| 144 login_db_->stats_table().RemoveStatsBetween(delete_begin, delete_end); | 144 login_db_->stats_table().RemoveStatsBetween(delete_begin, delete_end); |
| 145 } | 145 } |
| 146 | 146 |
| 147 ScopedVector<autofill::PasswordForm> PasswordStoreDefault::FillMatchingLogins( | 147 ScopedVector<autofill::PasswordForm> PasswordStoreDefault::FillMatchingLogins( |
| 148 const autofill::PasswordForm& form, | 148 const autofill::PasswordForm& form) { |
| 149 AuthorizationPromptPolicy prompt_policy) { | |
| 150 ScopedVector<autofill::PasswordForm> matched_forms; | 149 ScopedVector<autofill::PasswordForm> matched_forms; |
| 151 if (login_db_ && !login_db_->GetLogins(form, &matched_forms)) | 150 if (login_db_ && !login_db_->GetLogins(form, &matched_forms)) |
| 152 return ScopedVector<autofill::PasswordForm>(); | 151 return ScopedVector<autofill::PasswordForm>(); |
| 153 return matched_forms; | 152 return matched_forms; |
| 154 } | 153 } |
| 155 | 154 |
| 156 bool PasswordStoreDefault::FillAutofillableLogins( | 155 bool PasswordStoreDefault::FillAutofillableLogins( |
| 157 ScopedVector<PasswordForm>* forms) { | 156 ScopedVector<PasswordForm>* forms) { |
| 158 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 157 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
| 159 return login_db_ && login_db_->GetAutofillableLogins(forms); | 158 return login_db_ && login_db_->GetAutofillableLogins(forms); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 183 return login_db_ ? login_db_->stats_table().GetRows(origin_domain) | 182 return login_db_ ? login_db_->stats_table().GetRows(origin_domain) |
| 184 : std::vector<scoped_ptr<InteractionsStats>>(); | 183 : std::vector<scoped_ptr<InteractionsStats>>(); |
| 185 } | 184 } |
| 186 | 185 |
| 187 void PasswordStoreDefault::ResetLoginDB() { | 186 void PasswordStoreDefault::ResetLoginDB() { |
| 188 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 187 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
| 189 login_db_.reset(); | 188 login_db_.reset(); |
| 190 } | 189 } |
| 191 | 190 |
| 192 } // namespace password_manager | 191 } // namespace password_manager |
| OLD | NEW |