Index: chrome/browser/webdata/logins_table.cc |
diff --git a/chrome/browser/webdata/logins_table.cc b/chrome/browser/webdata/logins_table.cc |
index 35a1be2a2b2fed2869539ed72fb03a4dffb89a08..e97bfdccc39560dd079c773f381343af28134b64 100644 |
--- a/chrome/browser/webdata/logins_table.cc |
+++ b/chrome/browser/webdata/logins_table.cc |
@@ -7,9 +7,30 @@ |
#include <limits> |
#include "base/logging.h" |
+#include "chrome/browser/webdata/web_database.h" |
#include "sql/statement.h" |
-bool LoginsTable::Init() { |
+namespace { |
+ |
+int table_key = 0; |
+ |
+WebDatabaseTable::TypeKey GetKey() { |
+ return reinterpret_cast<void*>(&table_key); |
+} |
+ |
+} // namespace |
+ |
+LoginsTable* LoginsTable::FromWebDatabase(WebDatabase* db) { |
+ return static_cast<LoginsTable*>(db->GetTable(GetKey())); |
+} |
+ |
+WebDatabaseTable::TypeKey LoginsTable::GetTypeKey() const { |
+ return GetKey(); |
+} |
+ |
+bool LoginsTable::Init(sql::Connection* db, sql::MetaTable* meta_table) { |
+ WebDatabaseTable::Init(db, meta_table); |
+ |
if (db_->DoesTableExist("logins")) { |
// We don't check for success. It doesn't matter that much. |
// If we fail we'll just try again later anyway. |