| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/history/thumbnail_database.h" | 5 #include "chrome/browser/history/thumbnail_database.h" | 
| 6 | 6 | 
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" | 
| 8 #include "base/gfx/jpeg_codec.h" | 8 #include "base/gfx/jpeg_codec.h" | 
| 9 #include "base/time.h" | 9 #include "base/time.h" | 
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" | 
| 11 #include "chrome/browser/history/history_publisher.h" | 11 #include "chrome/browser/history/history_publisher.h" | 
| 12 #include "chrome/browser/history/url_database.h" | 12 #include "chrome/browser/history/url_database.h" | 
| 13 #include "chrome/common/sqlite_utils.h" | 13 #include "chrome/common/sqlite_utils.h" | 
| 14 #include "chrome/common/thumbnail_score.h" | 14 #include "chrome/common/thumbnail_score.h" | 
| 15 #include "skia/include/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" | 
| 16 | 16 | 
| 17 using base::Time; | 17 using base::Time; | 
| 18 | 18 | 
| 19 namespace history { | 19 namespace history { | 
| 20 | 20 | 
| 21 // Version number of the database. | 21 // Version number of the database. | 
| 22 static const int kCurrentVersionNumber = 3; | 22 static const int kCurrentVersionNumber = 3; | 
| 23 static const int kCompatibleVersionNumber = 3; | 23 static const int kCompatibleVersionNumber = 3; | 
| 24 | 24 | 
| 25 ThumbnailDatabase::ThumbnailDatabase() | 25 ThumbnailDatabase::ThumbnailDatabase() | 
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 464   if (sqlite3_exec(db_, "ALTER TABLE temp_favicons RENAME TO favicons", | 464   if (sqlite3_exec(db_, "ALTER TABLE temp_favicons RENAME TO favicons", | 
| 465                    NULL, NULL, NULL) != SQLITE_OK) | 465                    NULL, NULL, NULL) != SQLITE_OK) | 
| 466     return false; | 466     return false; | 
| 467 | 467 | 
| 468   // The renamed table needs the index (the temporary table doesn't have one). | 468   // The renamed table needs the index (the temporary table doesn't have one). | 
| 469   InitFavIconsIndex(); | 469   InitFavIconsIndex(); | 
| 470   return true; | 470   return true; | 
| 471 } | 471 } | 
| 472 | 472 | 
| 473 }  // namespace history | 473 }  // namespace history | 
| OLD | NEW | 
|---|