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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 static const char kDefaultSearchProviderKey[]; | 84 static const char kDefaultSearchProviderKey[]; |
85 | 85 |
86 KeywordTable(); | 86 KeywordTable(); |
87 virtual ~KeywordTable(); | 87 virtual ~KeywordTable(); |
88 | 88 |
89 // Retrieves the KeywordTable* owned by |database|. | 89 // Retrieves the KeywordTable* owned by |database|. |
90 static KeywordTable* FromWebDatabase(WebDatabase* db); | 90 static KeywordTable* FromWebDatabase(WebDatabase* db); |
91 | 91 |
92 virtual WebDatabaseTable::TypeKey GetTypeKey() const OVERRIDE; | 92 virtual WebDatabaseTable::TypeKey GetTypeKey() const OVERRIDE; |
93 virtual bool Init(sql::Connection* db, sql::MetaTable* meta_table) OVERRIDE; | 93 virtual bool CreateTablesIfNecessary() OVERRIDE; |
94 virtual bool IsSyncable() OVERRIDE; | 94 virtual bool IsSyncable() OVERRIDE; |
95 virtual bool MigrateToVersion(int version, | 95 virtual bool MigrateToVersion(int version, |
96 bool* update_compatible_version) OVERRIDE; | 96 bool* update_compatible_version) OVERRIDE; |
97 | 97 |
98 // Adds a new keyword, updating the id field on success. | 98 // Adds a new keyword, updating the id field on success. |
99 // Returns true if successful. | 99 // Returns true if successful. |
100 bool AddKeyword(const TemplateURLData& data); | 100 bool AddKeyword(const TemplateURLData& data); |
101 | 101 |
102 // Removes the specified keyword. | 102 // Removes the specified keyword. |
103 // Returns true if successful. | 103 // Returns true if successful. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 std::string* result); | 170 std::string* result); |
171 | 171 |
172 // Migrates table |name| (which should be either "keywords" or | 172 // Migrates table |name| (which should be either "keywords" or |
173 // "keywords_backup") from version 44 to version 45. | 173 // "keywords_backup") from version 44 to version 45. |
174 bool MigrateKeywordsTableForVersion45(const std::string& name); | 174 bool MigrateKeywordsTableForVersion45(const std::string& name); |
175 | 175 |
176 DISALLOW_COPY_AND_ASSIGN(KeywordTable); | 176 DISALLOW_COPY_AND_ASSIGN(KeywordTable); |
177 }; | 177 }; |
178 | 178 |
179 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ | 179 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
OLD | NEW |