| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/webdata/web_database_table.h" | 11 #include "chrome/browser/webdata/web_database_table.h" |
| 12 | 12 |
| 13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 14 struct IE7PasswordInfo; | 14 struct IE7PasswordInfo; |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 // This class manages the logins table within the SQLite database passed to the | 17 // This class manages the logins table within the SQLite database passed to the |
| 18 // constructor. We no longer store passwords here except for imported IE | 18 // constructor. We no longer store passwords here except for imported IE |
| 19 // passwords, so this class is now mostly responsible for deleting the table if | 19 // passwords, so this class is now mostly responsible for deleting the table if |
| 20 // it is found to exist. (The data was migrated out long ago.) | 20 // it is found to exist. (The data was migrated out long ago.) |
| 21 class LoginsTable : public WebDatabaseTable { | 21 class LoginsTable : public WebDatabaseTable { |
| 22 public: | 22 public: |
| 23 LoginsTable(sql::Connection* db, sql::MetaTable* meta_table) | 23 LoginsTable(sql::Connection* db, sql::MetaTable* meta_table) |
| 24 : WebDatabaseTable(db, meta_table) {} | 24 : WebDatabaseTable(db, meta_table) {} |
| 25 virtual ~LoginsTable() {} | 25 virtual ~LoginsTable() {} |
| 26 virtual bool Init() OVERRIDE; | 26 virtual bool Init() OVERRIDE; |
| 27 virtual bool IsSyncable() OVERRIDE; | 27 virtual bool IsSyncable() OVERRIDE; |
| 28 virtual bool MigrateToVersion(int version, |
| 29 const std::string& app_locale, |
| 30 bool* update_compatible_version) OVERRIDE; |
| 28 | 31 |
| 29 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
| 30 // Adds |info| to the list of imported passwords from ie7/ie8. | 33 // Adds |info| to the list of imported passwords from ie7/ie8. |
| 31 bool AddIE7Login(const IE7PasswordInfo& info); | 34 bool AddIE7Login(const IE7PasswordInfo& info); |
| 32 | 35 |
| 33 // Removes |info| from the list of imported passwords from ie7/ie8. | 36 // Removes |info| from the list of imported passwords from ie7/ie8. |
| 34 bool RemoveIE7Login(const IE7PasswordInfo& info); | 37 bool RemoveIE7Login(const IE7PasswordInfo& info); |
| 35 | 38 |
| 36 // Return the ie7/ie8 login matching |info|. | 39 // Return the ie7/ie8 login matching |info|. |
| 37 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result); | 40 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result); |
| 38 #endif | 41 #endif |
| 39 | 42 |
| 40 private: | 43 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(LoginsTable); | 44 DISALLOW_COPY_AND_ASSIGN(LoginsTable); |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 #endif // CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ | 47 #endif // CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ |
| OLD | NEW |