OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // input_encodings Semicolon separated list of supported input | 40 // input_encodings Semicolon separated list of supported input |
41 // encodings, may be empty. | 41 // encodings, may be empty. |
42 // suggest_url | 42 // suggest_url |
43 // prepopulate_id See TemplateURL::prepopulate_id. | 43 // prepopulate_id See TemplateURL::prepopulate_id. |
44 // autogenerate_keyword | 44 // autogenerate_keyword |
45 // logo_id See TemplateURL::logo_id | 45 // logo_id See TemplateURL::logo_id |
46 // created_by_policy See TemplateURL::created_by_policy. This was added | 46 // created_by_policy See TemplateURL::created_by_policy. This was added |
47 // in version 26. | 47 // in version 26. |
48 // instant_url See TemplateURL::instant_url. This was added | 48 // instant_url See TemplateURL::instant_url. This was added |
49 // in version 29. | 49 // in version 29. |
| 50 // last_modified See TemplateURL::last_modified. This was added in |
| 51 // version 38. |
50 // | 52 // |
51 class KeywordTable : public WebDatabaseTable { | 53 class KeywordTable : public WebDatabaseTable { |
52 public: | 54 public: |
53 KeywordTable(sql::Connection* db, sql::MetaTable* meta_table) | 55 KeywordTable(sql::Connection* db, sql::MetaTable* meta_table) |
54 : WebDatabaseTable(db, meta_table) {} | 56 : WebDatabaseTable(db, meta_table) {} |
55 virtual ~KeywordTable(); | 57 virtual ~KeywordTable(); |
56 virtual bool Init(); | 58 virtual bool Init(); |
57 virtual bool IsSyncable(); | 59 virtual bool IsSyncable(); |
58 | 60 |
59 // Adds a new keyword, updating the id field on success. | 61 // Adds a new keyword, updating the id field on success. |
(...skipping 20 matching lines...) Expand all Loading... |
80 // Version of the built-in keywords. | 82 // Version of the built-in keywords. |
81 bool SetBuitinKeywordVersion(int version); | 83 bool SetBuitinKeywordVersion(int version); |
82 int GetBuitinKeywordVersion(); | 84 int GetBuitinKeywordVersion(); |
83 | 85 |
84 // Table migration functions. | 86 // Table migration functions. |
85 bool MigrateToVersion21AutoGenerateKeywordColumn(); | 87 bool MigrateToVersion21AutoGenerateKeywordColumn(); |
86 bool MigrateToVersion25AddLogoIDColumn(); | 88 bool MigrateToVersion25AddLogoIDColumn(); |
87 bool MigrateToVersion26AddCreatedByPolicyColumn(); | 89 bool MigrateToVersion26AddCreatedByPolicyColumn(); |
88 bool MigrateToVersion28SupportsInstantColumn(); | 90 bool MigrateToVersion28SupportsInstantColumn(); |
89 bool MigrateToVersion29InstantUrlToSupportsInstant(); | 91 bool MigrateToVersion29InstantUrlToSupportsInstant(); |
| 92 bool MigrateToVersion38AddLastModifiedColumn(); |
90 | 93 |
91 private: | 94 private: |
92 DISALLOW_COPY_AND_ASSIGN(KeywordTable); | 95 DISALLOW_COPY_AND_ASSIGN(KeywordTable); |
93 }; | 96 }; |
94 | 97 |
95 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ | 98 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
OLD | NEW |