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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 typedef std::vector<TemplateURLData> Keywords; | 68 typedef std::vector<TemplateURLData> Keywords; |
69 | 69 |
70 // Constants exposed for the benefit of test code: | 70 // Constants exposed for the benefit of test code: |
71 | 71 |
72 static const char kDefaultSearchProviderKey[]; | 72 static const char kDefaultSearchProviderKey[]; |
73 | 73 |
74 KeywordTable(sql::Connection* db, sql::MetaTable* meta_table); | 74 KeywordTable(sql::Connection* db, sql::MetaTable* meta_table); |
75 virtual ~KeywordTable(); | 75 virtual ~KeywordTable(); |
76 virtual bool Init() OVERRIDE; | 76 virtual bool Init() OVERRIDE; |
77 virtual bool IsSyncable() OVERRIDE; | 77 virtual bool IsSyncable() OVERRIDE; |
| 78 virtual bool MigrateToVersion(int version, |
| 79 const std::string& app_locale, |
| 80 bool* update_compatible_version) OVERRIDE; |
78 | 81 |
79 // Adds a new keyword, updating the id field on success. | 82 // Adds a new keyword, updating the id field on success. |
80 // Returns true if successful. | 83 // Returns true if successful. |
81 bool AddKeyword(const TemplateURLData& data); | 84 bool AddKeyword(const TemplateURLData& data); |
82 | 85 |
83 // Removes the specified keyword. | 86 // Removes the specified keyword. |
84 // Returns true if successful. | 87 // Returns true if successful. |
85 bool RemoveKeyword(TemplateURLID id); | 88 bool RemoveKeyword(TemplateURLID id); |
86 | 89 |
87 // Loads the keywords into the specified vector. It's up to the caller to | 90 // Loads the keywords into the specified vector. It's up to the caller to |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 std::string* result); | 152 std::string* result); |
150 | 153 |
151 // Migrates table |name| (which should be either "keywords" or | 154 // Migrates table |name| (which should be either "keywords" or |
152 // "keywords_backup") from version 44 to version 45. | 155 // "keywords_backup") from version 44 to version 45. |
153 bool MigrateKeywordsTableForVersion45(const std::string& name); | 156 bool MigrateKeywordsTableForVersion45(const std::string& name); |
154 | 157 |
155 DISALLOW_COPY_AND_ASSIGN(KeywordTable); | 158 DISALLOW_COPY_AND_ASSIGN(KeywordTable); |
156 }; | 159 }; |
157 | 160 |
158 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ | 161 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
OLD | NEW |