Index: chrome/browser/webdata/keyword_table.cc |
diff --git a/chrome/browser/webdata/keyword_table.cc b/chrome/browser/webdata/keyword_table.cc |
index 15fba4131d3b5aafdd8306624f91c1a6f63980f7..d412d840a18f1d80a800079664852dda9fad99b7 100644 |
--- a/chrome/browser/webdata/keyword_table.cc |
+++ b/chrome/browser/webdata/keyword_table.cc |
@@ -116,15 +116,29 @@ void BindURLToStatement(const TemplateURLData& data, |
s->BindString(starting_column + 17, data.search_terms_replacement_key); |
} |
-} // anonymous namespace |
+int table_key = 0; |
-KeywordTable::KeywordTable(sql::Connection* db, sql::MetaTable* meta_table) |
- : WebDatabaseTable(db, meta_table) { |
+WebDatabaseTable::TypeKey GetKey() { |
+ return reinterpret_cast<void*>(&table_key); |
+} |
+ |
+} // namespace |
+ |
+KeywordTable::KeywordTable() { |
} |
KeywordTable::~KeywordTable() {} |
-bool KeywordTable::Init() { |
+KeywordTable* KeywordTable::FromWebDatabase(WebDatabase* db) { |
+ return static_cast<KeywordTable*>(db->GetTable(GetKey())); |
+} |
+ |
+WebDatabaseTable::TypeKey KeywordTable::GetTypeKey() const { |
+ return GetKey(); |
+} |
+ |
+bool KeywordTable::Init(sql::Connection* db, sql::MetaTable* meta_table) { |
+ WebDatabaseTable::Init(db, meta_table); |
return db_->DoesTableExist("keywords") || |
db_->Execute("CREATE TABLE keywords (" |
"id INTEGER PRIMARY KEY," |