OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 LoginDatabase(); | 24 LoginDatabase(); |
25 virtual ~LoginDatabase(); | 25 virtual ~LoginDatabase(); |
26 | 26 |
27 // Initialize the database with an sqlite file at the given path. | 27 // Initialize the database with an sqlite file at the given path. |
28 // If false is returned, no other method should be called. | 28 // If false is returned, no other method should be called. |
29 bool Init(const FilePath& db_path); | 29 bool Init(const FilePath& db_path); |
30 | 30 |
31 // Adds |form| to the list of remembered password forms. | 31 // Adds |form| to the list of remembered password forms. |
32 bool AddLogin(const webkit_glue::PasswordForm& form); | 32 bool AddLogin(const webkit_glue::PasswordForm& form); |
33 | 33 |
34 // Updates remembered password form. | 34 // Updates remembered password form. Returns true on success and sets |
35 bool UpdateLogin(const webkit_glue::PasswordForm& form); | 35 // items_changed (if non-NULL) to the number of logins updated. |
| 36 bool UpdateLogin(const webkit_glue::PasswordForm& form, int* items_changed); |
36 | 37 |
37 // Removes |form| from the list of remembered password forms. | 38 // Removes |form| from the list of remembered password forms. |
38 bool RemoveLogin(const webkit_glue::PasswordForm& form); | 39 bool RemoveLogin(const webkit_glue::PasswordForm& form); |
39 | 40 |
40 // Removes all logins created from |delete_begin| onwards (inclusive) and | 41 // Removes all logins created from |delete_begin| onwards (inclusive) and |
41 // before |delete_end|. You may use a null Time value to do an unbounded | 42 // before |delete_end|. You may use a null Time value to do an unbounded |
42 // delete in either direction. | 43 // delete in either direction. |
43 bool RemoveLoginsCreatedBetween(const base::Time delete_begin, | 44 bool RemoveLoginsCreatedBetween(const base::Time delete_begin, |
44 const base::Time delete_end); | 45 const base::Time delete_end); |
45 | 46 |
(...skipping 28 matching lines...) Expand all Loading... |
74 SQLStatement* s) const; | 75 SQLStatement* s) const; |
75 | 76 |
76 sqlite3* db_; | 77 sqlite3* db_; |
77 MetaTableHelper meta_table_; | 78 MetaTableHelper meta_table_; |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(LoginDatabase); | 80 DISALLOW_COPY_AND_ASSIGN(LoginDatabase); |
80 }; | 81 }; |
81 | 82 |
82 | 83 |
83 #endif // CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ | 84 #endif // CHROME_BROWSER_PASSWORD_MANAGER_LOGIN_DATABASE_H_ |
OLD | NEW |