Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: chrome/browser/webdata/keyword_table.h

Issue 10908226: Introduces a search term extraction mechanism working for arbitrary search providers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indent fix. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/webdata/keyword_table.h
diff --git a/chrome/browser/webdata/keyword_table.h b/chrome/browser/webdata/keyword_table.h
index 1293a4ba040fb18d2eeb2f1755a7059550e23b05..8d03cfc29440a8be691b8fe4242e9d6daa5342bf 100644
--- a/chrome/browser/webdata/keyword_table.h
+++ b/chrome/browser/webdata/keyword_table.h
@@ -51,6 +51,8 @@ class Statement;
// in version 38.
// sync_guid See TemplateURLData::sync_guid. This was added in
// version 39.
+// alternate_urls See TemplateURLData::alternate_urls. This was added
+// in version 47.
//
// keywords_backup The full copy of the |keywords| table. Added in
// version 43. Must be in sync with |keywords|
@@ -89,8 +91,6 @@ class KeywordTable : public WebDatabaseTable {
// provider. The default search provider ID and the |keywords_backup| table
// are signed.
static const char kBackupSignatureKey[];
- // Comma-separated list of keyword table column names, in order.
- static const char kKeywordColumns[];
KeywordTable(sql::Connection* db, sql::MetaTable* meta_table);
virtual ~KeywordTable();
@@ -136,19 +136,26 @@ class KeywordTable : public WebDatabaseTable {
bool MigrateToVersion25AddLogoIDColumn();
bool MigrateToVersion26AddCreatedByPolicyColumn();
bool MigrateToVersion28SupportsInstantColumn();
- bool MigrateToVersion29InstantUrlToSupportsInstant();
+ bool MigrateToVersion29InstantURLToSupportsInstant();
bool MigrateToVersion38AddLastModifiedColumn();
bool MigrateToVersion39AddSyncGUIDColumn();
bool MigrateToVersion44AddDefaultSearchProviderBackup();
bool MigrateToVersion45RemoveLogoIDAndAutogenerateColumns();
+ bool MigrateToVersion47AddAlternateURLsColumn();
private:
FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, DefaultSearchProviderBackup);
FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContents);
FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContentsOrdering);
FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, SanitizeURLs);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseMigrationTest, MigrateVersion27ToCurrent);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseMigrationTest, MigrateVersion42ToCurrent);
FRIEND_TEST_ALL_PREFIXES(WebDatabaseMigrationTest, MigrateVersion44ToCurrent);
+ // Returns a comma-separated list of the keyword columns for the current
+ // version of the table.
Peter Kasting 2012/10/04 19:32:43 Nit: I'd be OK with making this public if it allow
beaudoin 2012/10/04 23:10:45 Done.
+ static std::string GetKeywordColumns();
+
// NOTE: Since the table columns have changed in different versions, many
// functions below take a |table_version| argument which dictates which
// version number's column set to use.
@@ -194,7 +201,7 @@ class KeywordTable : public WebDatabaseTable {
bool UpdateDefaultSearchProviderIDBackup(TemplateURLID* id);
// Migrates table |name| (which should be either "keywords" or
- // "keywords_backup" from version 44 to version 45.
+ // "keywords_backup") from version 44 to version 45.
bool MigrateKeywordsTableForVersion45(const std::string& name);
// Whether the backup was overwritten during migration.

Powered by Google App Engine
This is Rietveld 408576698