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

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

Issue 217613002: Misc. cleanup found while mucking with search engines code: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool MigrateToVersion39AddSyncGUIDColumn(); 134 bool MigrateToVersion39AddSyncGUIDColumn();
135 bool MigrateToVersion44AddDefaultSearchProviderBackup(); 135 bool MigrateToVersion44AddDefaultSearchProviderBackup();
136 bool MigrateToVersion45RemoveLogoIDAndAutogenerateColumns(); 136 bool MigrateToVersion45RemoveLogoIDAndAutogenerateColumns();
137 bool MigrateToVersion47AddAlternateURLsColumn(); 137 bool MigrateToVersion47AddAlternateURLsColumn();
138 bool MigrateToVersion48RemoveKeywordsBackup(); 138 bool MigrateToVersion48RemoveKeywordsBackup();
139 bool MigrateToVersion49AddSearchTermsReplacementKeyColumn(); 139 bool MigrateToVersion49AddSearchTermsReplacementKeyColumn();
140 bool MigrateToVersion52AddImageSearchAndPOSTSupport(); 140 bool MigrateToVersion52AddImageSearchAndPOSTSupport();
141 bool MigrateToVersion53AddNewTabURLColumn(); 141 bool MigrateToVersion53AddNewTabURLColumn();
142 142
143 private: 143 private:
144 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContents); 144 friend class KeywordTableTest;
145 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, GetTableContentsOrdering);
146 FRIEND_TEST_ALL_PREFIXES(KeywordTableTest, SanitizeURLs);
147 FRIEND_TEST_ALL_PREFIXES(WebDatabaseMigrationTest, MigrateVersion44ToCurrent); 145 FRIEND_TEST_ALL_PREFIXES(WebDatabaseMigrationTest, MigrateVersion44ToCurrent);
148 146
149 // NOTE: Since the table columns have changed in different versions, many 147 // NOTE: Since the table columns have changed in different versions, many
150 // functions below take a |table_version| argument which dictates which 148 // functions below take a |table_version| argument which dictates which
151 // version number's column set to use. 149 // version number's column set to use.
152 150
153 // Fills |data| with the data in |s|. Returns false if we couldn't fill 151 // Fills |data| with the data in |s|. Returns false if we couldn't fill
154 // |data| for some reason, e.g. |s| tried to set one of the fields to an 152 // |data| for some reason, e.g. |s| tried to set one of the fields to an
155 // illegal value. 153 // illegal value.
156 static bool GetKeywordDataFromStatement(const sql::Statement& s, 154 static bool GetKeywordDataFromStatement(const sql::Statement& s,
(...skipping 13 matching lines...) Expand all
170 std::string* result); 168 std::string* result);
171 169
172 // Migrates table |name| (which should be either "keywords" or 170 // Migrates table |name| (which should be either "keywords" or
173 // "keywords_backup") from version 44 to version 45. 171 // "keywords_backup") from version 44 to version 45.
174 bool MigrateKeywordsTableForVersion45(const std::string& name); 172 bool MigrateKeywordsTableForVersion45(const std::string& name);
175 173
176 DISALLOW_COPY_AND_ASSIGN(KeywordTable); 174 DISALLOW_COPY_AND_ASSIGN(KeywordTable);
177 }; 175 };
178 176
179 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ 177 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698