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

Side by Side Diff: chrome/browser/history/thumbnail_database.h

Issue 9005036: [sql] WARN_UNUSED_RESULT on Execute(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 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_HISTORY_THUMBNAIL_DATABASE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
6 #define CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ 6 #define CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 bool UpgradeToVersion5(); 260 bool UpgradeToVersion5();
261 261
262 // Migrates the icon mapping data from URL database to Thumbnail database. 262 // Migrates the icon mapping data from URL database to Thumbnail database.
263 // Return whether the migration succeeds. 263 // Return whether the migration succeeds.
264 bool MigrateIconMappingData(URLDatabase* url_db); 264 bool MigrateIconMappingData(URLDatabase* url_db);
265 265
266 // Creates the index over the favicon table. This will be called during 266 // Creates the index over the favicon table. This will be called during
267 // initialization after the table is created. This is a separate function 267 // initialization after the table is created. This is a separate function
268 // because it is used by SwapFaviconTables to create an index over the 268 // because it is used by SwapFaviconTables to create an index over the
269 // newly-renamed favicons table (formerly the temporary table with no index). 269 // newly-renamed favicons table (formerly the temporary table with no index).
270 void InitFaviconsIndex(); 270 bool InitFaviconsIndex();
271 271
272 // Creates the icon_map table, return true if the table already exists or was 272 // Creates the icon_map table, return true if the table already exists or was
273 // successfully created. 273 // successfully created.
274 bool InitIconMappingTable(sql::Connection* db, bool is_temporary); 274 bool InitIconMappingTable(sql::Connection* db, bool is_temporary);
275 275
276 // Creates the index over the icon_mapping table, This will be called during 276 // Creates the index over the icon_mapping table, This will be called during
277 // initialization after the table is created. This is a separate function 277 // initialization after the table is created. This is a separate function
278 // because it is used by CommitTemporaryIconMappingTable to create an index 278 // because it is used by CommitTemporaryIconMappingTable to create an index
279 // over the newly-renamed icon_mapping table (formerly the temporary table 279 // over the newly-renamed icon_mapping table (formerly the temporary table
280 // with no index). 280 // with no index).
281 void InitIconMappingIndex(); 281 bool InitIconMappingIndex();
282 282
283 // Adds a mapping between the given page_url and icon_id; The mapping will be 283 // Adds a mapping between the given page_url and icon_id; The mapping will be
284 // added to temp_icon_mapping table if is_temporary is true. 284 // added to temp_icon_mapping table if is_temporary is true.
285 // Returns the new mapping id if the adding succeeds, otherwise 0 is returned. 285 // Returns the new mapping id if the adding succeeds, otherwise 0 is returned.
286 IconMappingID AddIconMapping(const GURL& page_url, 286 IconMappingID AddIconMapping(const GURL& page_url,
287 FaviconID icon_id, 287 FaviconID icon_id,
288 bool is_temporary); 288 bool is_temporary);
289 289
290 // Returns True if the current database is latest. 290 // Returns True if the current database is latest.
291 bool IsLatestVersion(); 291 bool IsLatestVersion();
292 292
293 sql::Connection db_; 293 sql::Connection db_;
294 sql::MetaTable meta_table_; 294 sql::MetaTable meta_table_;
295 295
296 // This object is created and managed by the history backend. We maintain an 296 // This object is created and managed by the history backend. We maintain an
297 // opaque pointer to the object for our use. 297 // opaque pointer to the object for our use.
298 // This can be NULL if there are no indexers registered to receive indexing 298 // This can be NULL if there are no indexers registered to receive indexing
299 // data from us. 299 // data from us.
300 const HistoryPublisher* history_publisher_; 300 const HistoryPublisher* history_publisher_;
301 301
302 // True if migration to TopSites has been done and the thumbnails 302 // True if migration to TopSites has been done and the thumbnails
303 // table should not be used. 303 // table should not be used.
304 bool use_top_sites_; 304 bool use_top_sites_;
305 }; 305 };
306 306
307 } // namespace history 307 } // namespace history
308 308
309 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ 309 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698