| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STATISTICS_TABLE_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STATISTICS_TABLE_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STATISTICS_TABLE_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STATISTICS_TABLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Number of times the user dismissed the bubble. | 32 // Number of times the user dismissed the bubble. |
| 33 int dismissal_count = 0; | 33 int dismissal_count = 0; |
| 34 | 34 |
| 35 // The date when the row was updated. | 35 // The date when the row was updated. |
| 36 base::Time update_time; | 36 base::Time update_time; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 bool operator==(const InteractionsStats& lhs, const InteractionsStats& rhs); | 39 bool operator==(const InteractionsStats& lhs, const InteractionsStats& rhs); |
| 40 | 40 |
| 41 // Returns an element from |stats| with |username| or nullptr if not found. | 41 // Returns an element from |stats| with |username| or nullptr if not found. |
| 42 InteractionsStats* FindStatsByUsername( | 42 const InteractionsStats* FindStatsByUsername( |
| 43 const std::vector<std::unique_ptr<InteractionsStats>>& stats, | 43 const std::vector<const InteractionsStats*>& stats, |
| 44 const base::string16& username); | 44 const base::string16& username); |
| 45 | 45 |
| 46 // Represents the 'stats' table in the Login Database. | 46 // Represents the 'stats' table in the Login Database. |
| 47 class StatisticsTable { | 47 class StatisticsTable { |
| 48 public: | 48 public: |
| 49 StatisticsTable(); | 49 StatisticsTable(); |
| 50 ~StatisticsTable(); | 50 ~StatisticsTable(); |
| 51 | 51 |
| 52 // Initializes |db_|. | 52 // Initializes |db_|. |
| 53 void Init(sql::Connection* db); | 53 void Init(sql::Connection* db); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 sql::Connection* db_; | 79 sql::Connection* db_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(StatisticsTable); | 81 DISALLOW_COPY_AND_ASSIGN(StatisticsTable); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace password_manager | 84 } // namespace password_manager |
| 85 | 85 |
| 86 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STATISTICS_TABLE_H_ | 86 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STATISTICS_TABLE_H_ |
| OLD | NEW |