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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 KeywordTable(); | 75 KeywordTable(); |
76 virtual ~KeywordTable(); | 76 virtual ~KeywordTable(); |
77 | 77 |
78 // Retrieves the KeywordTable* owned by |database|. | 78 // Retrieves the KeywordTable* owned by |database|. |
79 static KeywordTable* FromWebDatabase(WebDatabase* db); | 79 static KeywordTable* FromWebDatabase(WebDatabase* db); |
80 | 80 |
81 virtual WebDatabaseTable::TypeKey GetTypeKey() const OVERRIDE; | 81 virtual WebDatabaseTable::TypeKey GetTypeKey() const OVERRIDE; |
82 virtual bool Init(sql::Connection* db, sql::MetaTable* meta_table) OVERRIDE; | 82 virtual bool Init(sql::Connection* db, sql::MetaTable* meta_table) OVERRIDE; |
83 virtual bool IsSyncable() OVERRIDE; | 83 virtual bool IsSyncable() OVERRIDE; |
84 virtual bool MigrateToVersion(int version, | 84 virtual bool MigrateToVersion(int version, |
85 const std::string& app_locale, | |
86 bool* update_compatible_version) OVERRIDE; | 85 bool* update_compatible_version) OVERRIDE; |
87 | 86 |
88 // Adds a new keyword, updating the id field on success. | 87 // Adds a new keyword, updating the id field on success. |
89 // Returns true if successful. | 88 // Returns true if successful. |
90 bool AddKeyword(const TemplateURLData& data); | 89 bool AddKeyword(const TemplateURLData& data); |
91 | 90 |
92 // Removes the specified keyword. | 91 // Removes the specified keyword. |
93 // Returns true if successful. | 92 // Returns true if successful. |
94 bool RemoveKeyword(TemplateURLID id); | 93 bool RemoveKeyword(TemplateURLID id); |
95 | 94 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 std::string* result); | 157 std::string* result); |
159 | 158 |
160 // Migrates table |name| (which should be either "keywords" or | 159 // Migrates table |name| (which should be either "keywords" or |
161 // "keywords_backup") from version 44 to version 45. | 160 // "keywords_backup") from version 44 to version 45. |
162 bool MigrateKeywordsTableForVersion45(const std::string& name); | 161 bool MigrateKeywordsTableForVersion45(const std::string& name); |
163 | 162 |
164 DISALLOW_COPY_AND_ASSIGN(KeywordTable); | 163 DISALLOW_COPY_AND_ASSIGN(KeywordTable); |
165 }; | 164 }; |
166 | 165 |
167 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ | 166 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
OLD | NEW |