| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBDATA_LOGINS_TABLE_H_ | 5 #ifndef CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ |
| 6 #define CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ | 6 #define CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/webdata/web_database_table.h" | 12 #include "chrome/browser/webdata/web_database_table.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class Time; | 15 class Time; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace webkit_glue { | 18 namespace webkit_glue { |
| 18 struct PasswordForm; | 19 struct PasswordForm; |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 43 // entries have a value of 0. | 44 // entries have a value of 0. |
| 44 // blacklisted_by_user Tracks whether or not the user opted to 'never | 45 // blacklisted_by_user Tracks whether or not the user opted to 'never |
| 45 // remember' | 46 // remember' |
| 46 // passwords for this site. | 47 // passwords for this site. |
| 47 // | 48 // |
| 48 class LoginsTable : public WebDatabaseTable { | 49 class LoginsTable : public WebDatabaseTable { |
| 49 public: | 50 public: |
| 50 LoginsTable(sql::Connection* db, sql::MetaTable* meta_table) | 51 LoginsTable(sql::Connection* db, sql::MetaTable* meta_table) |
| 51 : WebDatabaseTable(db, meta_table) {} | 52 : WebDatabaseTable(db, meta_table) {} |
| 52 virtual ~LoginsTable() {} | 53 virtual ~LoginsTable() {} |
| 53 virtual bool Init(); | 54 virtual bool Init() OVERRIDE; |
| 54 virtual bool IsSyncable(); | 55 virtual bool IsSyncable() OVERRIDE; |
| 55 | 56 |
| 56 // Adds |form| to the list of remembered password forms. | 57 // Adds |form| to the list of remembered password forms. |
| 57 bool AddLogin(const webkit_glue::PasswordForm& form); | 58 bool AddLogin(const webkit_glue::PasswordForm& form); |
| 58 | 59 |
| 59 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
| 60 // Adds |info| to the list of imported passwords from ie7/ie8. | 61 // Adds |info| to the list of imported passwords from ie7/ie8. |
| 61 bool AddIE7Login(const IE7PasswordInfo& info); | 62 bool AddIE7Login(const IE7PasswordInfo& info); |
| 62 | 63 |
| 63 // Removes |info| from the list of imported passwords from ie7/ie8. | 64 // Removes |info| from the list of imported passwords from ie7/ie8. |
| 64 bool RemoveIE7Login(const IE7PasswordInfo& info); | 65 bool RemoveIE7Login(const IE7PasswordInfo& info); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 90 // actually autofill-able; i.e haven't been blacklisted by the user selecting | 91 // actually autofill-able; i.e haven't been blacklisted by the user selecting |
| 91 // the 'Never for this site' button. | 92 // the 'Never for this site' button. |
| 92 bool GetAllLogins(std::vector<webkit_glue::PasswordForm*>* forms, | 93 bool GetAllLogins(std::vector<webkit_glue::PasswordForm*>* forms, |
| 93 bool include_blacklisted); | 94 bool include_blacklisted); |
| 94 | 95 |
| 95 private: | 96 private: |
| 96 DISALLOW_COPY_AND_ASSIGN(LoginsTable); | 97 DISALLOW_COPY_AND_ASSIGN(LoginsTable); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 #endif // CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ | 100 #endif // CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ |
| OLD | NEW |