Chromium Code Reviews| 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 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 base::Time delete_end); | 55 base::Time delete_end); |
| 56 | 56 |
| 57 // Removes all logins synced from |delete_begin| onwards (inclusive) and | 57 // Removes all logins synced from |delete_begin| onwards (inclusive) and |
| 58 // before |delete_end|. You may use a null Time value to do an unbounded | 58 // before |delete_end|. You may use a null Time value to do an unbounded |
| 59 // delete in either direction. | 59 // delete in either direction. |
| 60 bool RemoveLoginsSyncedBetween(base::Time delete_begin, | 60 bool RemoveLoginsSyncedBetween(base::Time delete_begin, |
| 61 base::Time delete_end); | 61 base::Time delete_end); |
| 62 | 62 |
| 63 // Loads a list of matching password forms into the specified vector |forms|. | 63 // Loads a list of matching password forms into the specified vector |forms|. |
| 64 // The list will contain all possibly relevant entries to the observed |form|, | 64 // The list will contain all possibly relevant entries to the observed |form|, |
| 65 // including blacklisted matches. | 65 // including blacklisted matches. The caller ownes |forms| after the call. |
|
vabr (Chromium)
2014/07/02 14:10:35
typo: ownes->owns (also below)
vasilii
2014/07/02 15:28:32
Done.
| |
| 66 bool GetLogins(const autofill::PasswordForm& form, | 66 bool GetLogins(const autofill::PasswordForm& form, |
| 67 std::vector<autofill::PasswordForm*>* forms) const; | 67 std::vector<autofill::PasswordForm*>* forms) const; |
| 68 | 68 |
| 69 // Loads all logins created from |begin| onwards (inclusive) and before |end|. | 69 // Loads all logins created from |begin| onwards (inclusive) and before |end|. |
| 70 // You may use a null Time value to do an unbounded search in either | 70 // You may use a null Time value to do an unbounded search in either |
| 71 // direction. | 71 // direction. The caller ownes |forms| after the call. |
| 72 bool GetLoginsCreatedBetween( | 72 bool GetLoginsCreatedBetween( |
| 73 base::Time begin, | 73 base::Time begin, |
| 74 base::Time end, | 74 base::Time end, |
| 75 std::vector<autofill::PasswordForm*>* forms) const; | 75 std::vector<autofill::PasswordForm*>* forms) const; |
| 76 | 76 |
| 77 // Loads all logins synced from |begin| onwards (inclusive) and before |end|. | 77 // Loads all logins synced from |begin| onwards (inclusive) and before |end|. |
| 78 // You may use a null Time value to do an unbounded search in either | 78 // You may use a null Time value to do an unbounded search in either |
| 79 // direction. | 79 // direction. The caller ownes |forms| after the call. |
| 80 bool GetLoginsSyncedBetween( | 80 bool GetLoginsSyncedBetween( |
| 81 base::Time begin, | 81 base::Time begin, |
| 82 base::Time end, | 82 base::Time end, |
| 83 std::vector<autofill::PasswordForm*>* forms) const; | 83 std::vector<autofill::PasswordForm*>* forms) const; |
| 84 | 84 |
| 85 // Loads the complete list of autofillable password forms (i.e., not blacklist | 85 // Loads the complete list of autofillable password forms (i.e., not blacklist |
| 86 // entries) into |forms|. | 86 // entries) into |forms|. The caller ownes |forms| after the call. |
| 87 bool GetAutofillableLogins( | 87 bool GetAutofillableLogins( |
| 88 std::vector<autofill::PasswordForm*>* forms) const; | 88 std::vector<autofill::PasswordForm*>* forms) const; |
| 89 | 89 |
| 90 // Loads the complete list of blacklist forms into |forms|. | 90 // Loads the complete list of blacklist forms into |forms|. The caller ownes |
| 91 // |forms| after the call. | |
| 91 bool GetBlacklistLogins( | 92 bool GetBlacklistLogins( |
| 92 std::vector<autofill::PasswordForm*>* forms) const; | 93 std::vector<autofill::PasswordForm*>* forms) const; |
| 93 | 94 |
| 94 // Deletes the login database file on disk, and creates a new, empty database. | 95 // Deletes the login database file on disk, and creates a new, empty database. |
| 95 // This can be used after migrating passwords to some other store, to ensure | 96 // This can be used after migrating passwords to some other store, to ensure |
| 96 // that SQLite doesn't leave fragments of passwords in the database file. | 97 // that SQLite doesn't leave fragments of passwords in the database file. |
| 97 // Returns true on success; otherwise, whether the file was deleted and | 98 // Returns true on success; otherwise, whether the file was deleted and |
| 98 // whether further use of this login database will succeed is unspecified. | 99 // whether further use of this login database will succeed is unspecified. |
| 99 bool DeleteAndRecreateDatabaseFile(); | 100 bool DeleteAndRecreateDatabaseFile(); |
| 100 | 101 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 sql::MetaTable meta_table_; | 148 sql::MetaTable meta_table_; |
| 148 | 149 |
| 149 PSLMatchingHelper psl_helper_; | 150 PSLMatchingHelper psl_helper_; |
| 150 | 151 |
| 151 DISALLOW_COPY_AND_ASSIGN(LoginDatabase); | 152 DISALLOW_COPY_AND_ASSIGN(LoginDatabase); |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 } // namespace password_manager | 155 } // namespace password_manager |
| 155 | 156 |
| 156 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ | 157 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOGIN_DATABASE_H_ |
| OLD | NEW |