Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/webdata/keyword_table.h

Issue 12518017: Generalize migration code in WebDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge of LKGR Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/webdata/autofill_table.cc ('k') | chrome/browser/webdata/keyword_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autofill_table.cc ('k') | chrome/browser/webdata/keyword_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698