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_KEYWORD_TABLE_H_ | 5 #ifndef CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
6 #define CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ | 6 #define CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // created_by_policy See TemplateURLData::created_by_policy. This was | 46 // created_by_policy See TemplateURLData::created_by_policy. This was |
47 // added in version 26. | 47 // added in version 26. |
48 // instant_url See TemplateURLData::instant_url. This was added in | 48 // instant_url See TemplateURLData::instant_url. This was added in |
49 // version 29. | 49 // version 29. |
50 // last_modified See TemplateURLData::last_modified. This was added | 50 // last_modified See TemplateURLData::last_modified. This was added |
51 // in version 38. | 51 // in version 38. |
52 // sync_guid See TemplateURLData::sync_guid. This was added in | 52 // sync_guid See TemplateURLData::sync_guid. This was added in |
53 // version 39. | 53 // version 39. |
54 // alternate_urls See TemplateURLData::alternate_urls. This was added | 54 // alternate_urls See TemplateURLData::alternate_urls. This was added |
55 // in version 47. | 55 // in version 47. |
| 56 // search_terms_replacement_key |
| 57 // See TemplateURLData::search_terms_replacement_key. |
| 58 // This was added in version 48. |
| 59 // |
56 // | 60 // |
57 // keywords_backup The full copy of the |keywords| table. Added in | 61 // keywords_backup The full copy of the |keywords| table. Added in |
58 // version 43. Must be in sync with |keywords| | 62 // version 43. Must be in sync with |keywords| |
59 // table otherwise verification of default search | 63 // table otherwise verification of default search |
60 // provider settings will fail. | 64 // provider settings will fail. |
61 // | 65 // |
62 // This class also manages some fields in the |meta| table: | 66 // This class also manages some fields in the |meta| table: |
63 // | 67 // |
64 // Default Search Provider ID The id of the default search provider. | 68 // Default Search Provider ID The id of the default search provider. |
65 // Default Search Provider ID Backup | 69 // Default Search Provider ID Backup |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 bool MigrateToVersion21AutoGenerateKeywordColumn(); | 143 bool MigrateToVersion21AutoGenerateKeywordColumn(); |
140 bool MigrateToVersion25AddLogoIDColumn(); | 144 bool MigrateToVersion25AddLogoIDColumn(); |
141 bool MigrateToVersion26AddCreatedByPolicyColumn(); | 145 bool MigrateToVersion26AddCreatedByPolicyColumn(); |
142 bool MigrateToVersion28SupportsInstantColumn(); | 146 bool MigrateToVersion28SupportsInstantColumn(); |
143 bool MigrateToVersion29InstantURLToSupportsInstant(); | 147 bool MigrateToVersion29InstantURLToSupportsInstant(); |
144 bool MigrateToVersion38AddLastModifiedColumn(); | 148 bool MigrateToVersion38AddLastModifiedColumn(); |
145 bool MigrateToVersion39AddSyncGUIDColumn(); | 149 bool MigrateToVersion39AddSyncGUIDColumn(); |
146 bool MigrateToVersion44AddDefaultSearchProviderBackup(); | 150 bool MigrateToVersion44AddDefaultSearchProviderBackup(); |
147 bool MigrateToVersion45RemoveLogoIDAndAutogenerateColumns(); | 151 bool MigrateToVersion45RemoveLogoIDAndAutogenerateColumns(); |
148 bool MigrateToVersion47AddAlternateURLsColumn(); | 152 bool MigrateToVersion47AddAlternateURLsColumn(); |
| 153 bool MigrateToVersion48AddSearchTermsReplacementKeyColumn(); |
149 | 154 |
150 private: | 155 private: |
151 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, DefaultSearchProviderBackup); | 156 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, DefaultSearchProviderBackup); |
152 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContents); | 157 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContents); |
153 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContentsOrdering); | 158 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContentsOrdering); |
154 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, SanitizeURLs); | 159 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, SanitizeURLs); |
155 FRIEND_TEST_ALL_PREFIXES(WebDatabaseMigrationTest, MigrateVersion44ToCurrent); | 160 FRIEND_TEST_ALL_PREFIXES(WebDatabaseMigrationTest, MigrateVersion44ToCurrent); |
156 | 161 |
157 // NOTE: Since the table columns have changed in different versions, many | 162 // NOTE: Since the table columns have changed in different versions, many |
158 // functions below take a |table_version| argument which dictates which | 163 // functions below take a |table_version| argument which dictates which |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // "keywords_backup") from version 44 to version 45. | 207 // "keywords_backup") from version 44 to version 45. |
203 bool MigrateKeywordsTableForVersion45(const std::string& name); | 208 bool MigrateKeywordsTableForVersion45(const std::string& name); |
204 | 209 |
205 // Whether the backup was overwritten during migration. | 210 // Whether the backup was overwritten during migration. |
206 bool backup_overwritten_; | 211 bool backup_overwritten_; |
207 | 212 |
208 DISALLOW_COPY_AND_ASSIGN(KeywordTable); | 213 DISALLOW_COPY_AND_ASSIGN(KeywordTable); |
209 }; | 214 }; |
210 | 215 |
211 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ | 216 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
OLD | NEW |