| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 if (login_db_) | 198 if (login_db_) |
| 199 login_db_->stats_table().AddRow(stats); | 199 login_db_->stats_table().AddRow(stats); |
| 200 } | 200 } |
| 201 | 201 |
| 202 void PasswordStoreDefault::RemoveSiteStatsImpl(const GURL& origin_domain) { | 202 void PasswordStoreDefault::RemoveSiteStatsImpl(const GURL& origin_domain) { |
| 203 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 203 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
| 204 if (login_db_) | 204 if (login_db_) |
| 205 login_db_->stats_table().RemoveRow(origin_domain); | 205 login_db_->stats_table().RemoveRow(origin_domain); |
| 206 } | 206 } |
| 207 | 207 |
| 208 std::vector<InteractionsStats> PasswordStoreDefault::GetAllSiteStatsImpl() { |
| 209 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
| 210 return login_db_ ? login_db_->stats_table().GetAllRows() |
| 211 : std::vector<InteractionsStats>(); |
| 212 } |
| 213 |
| 208 std::vector<InteractionsStats> PasswordStoreDefault::GetSiteStatsImpl( | 214 std::vector<InteractionsStats> PasswordStoreDefault::GetSiteStatsImpl( |
| 209 const GURL& origin_domain) { | 215 const GURL& origin_domain) { |
| 210 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 216 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
| 211 return login_db_ ? login_db_->stats_table().GetRows(origin_domain) | 217 return login_db_ ? login_db_->stats_table().GetRows(origin_domain) |
| 212 : std::vector<InteractionsStats>(); | 218 : std::vector<InteractionsStats>(); |
| 213 } | 219 } |
| 214 | 220 |
| 215 void PasswordStoreDefault::ResetLoginDB() { | 221 void PasswordStoreDefault::ResetLoginDB() { |
| 216 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 222 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
| 217 login_db_.reset(); | 223 login_db_.reset(); |
| 218 } | 224 } |
| 219 | 225 |
| 220 } // namespace password_manager | 226 } // namespace password_manager |
| OLD | NEW |