Index: chrome/browser/webdata/token_service_table.cc |
diff --git a/chrome/browser/webdata/token_service_table.cc b/chrome/browser/webdata/token_service_table.cc |
index df8f1f1cd1b0ef5373a90a098d5a26bbbd39fc45..ee8410f82a72e6a9cead5a869fa69cb86befeabc 100644 |
--- a/chrome/browser/webdata/token_service_table.cc |
+++ b/chrome/browser/webdata/token_service_table.cc |
@@ -9,9 +9,30 @@ |
#include "base/logging.h" |
#include "chrome/browser/password_manager/encryptor.h" |
+#include "chrome/browser/webdata/web_database.h" |
#include "sql/statement.h" |
-bool TokenServiceTable::Init() { |
+namespace { |
+ |
+int table_key = 0; |
+ |
+WebDatabaseTable::TypeKey GetKey() { |
+ return reinterpret_cast<void*>(&table_key); |
+} |
+ |
+} // namespace |
+ |
+TokenServiceTable* TokenServiceTable::FromWebDatabase(WebDatabase* db) { |
+ return static_cast<TokenServiceTable*>(db->GetTable(GetKey())); |
+ |
+} |
+ |
+WebDatabaseTable::TypeKey TokenServiceTable::GetTypeKey() const { |
+ return GetKey(); |
+} |
+ |
+bool TokenServiceTable::Init(sql::Connection* db, sql::MetaTable* meta_table) { |
+ WebDatabaseTable::Init(db, meta_table); |
if (!db_->DoesTableExist("token_service")) { |
if (!db_->Execute("CREATE TABLE token_service (" |
"service VARCHAR PRIMARY KEY NOT NULL," |