| OLD | NEW |
| 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_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 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/history/history_types.h" | 14 #include "chrome/browser/history/history_types.h" |
| 15 #include "sql/connection.h" | 15 #include "sql/connection.h" |
| 16 #include "sql/init_status.h" | 16 #include "sql/init_status.h" |
| 17 #include "sql/meta_table.h" | 17 #include "sql/meta_table.h" |
| 18 #include "sql/statement.h" | 18 #include "sql/statement.h" |
| 19 | 19 |
| 20 class FilePath; | 20 class FilePath; |
| 21 class RefCountedMemory; | |
| 22 struct ThumbnailScore; | 21 struct ThumbnailScore; |
| 23 class SkBitmap; | 22 class SkBitmap; |
| 24 | 23 |
| 25 namespace base { | 24 namespace base { |
| 25 class RefCountedMemory; |
| 26 class Time; | 26 class Time; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace gfx { | 29 namespace gfx { |
| 30 class Image; | 30 class Image; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace history { | 33 namespace history { |
| 34 | 34 |
| 35 class ExpireHistoryBackend; | 35 class ExpireHistoryBackend; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // Called by the to delete all old thumbnails and make a clean table. | 98 // Called by the to delete all old thumbnails and make a clean table. |
| 99 // Returns true on success. | 99 // Returns true on success. |
| 100 bool RecreateThumbnailTable(); | 100 bool RecreateThumbnailTable(); |
| 101 | 101 |
| 102 // Favicons ------------------------------------------------------------------ | 102 // Favicons ------------------------------------------------------------------ |
| 103 | 103 |
| 104 // Sets the bits for a favicon. This should be png encoded data. | 104 // Sets the bits for a favicon. This should be png encoded data. |
| 105 // The time indicates the access time, and is used to detect when the favicon | 105 // The time indicates the access time, and is used to detect when the favicon |
| 106 // should be refreshed. | 106 // should be refreshed. |
| 107 bool SetFavicon(FaviconID icon_id, | 107 bool SetFavicon(FaviconID icon_id, |
| 108 scoped_refptr<RefCountedMemory> icon_data, | 108 scoped_refptr<base::RefCountedMemory> icon_data, |
| 109 base::Time time); | 109 base::Time time); |
| 110 | 110 |
| 111 // Sets the time the favicon was last updated. | 111 // Sets the time the favicon was last updated. |
| 112 bool SetFaviconLastUpdateTime(FaviconID icon_id, base::Time time); | 112 bool SetFaviconLastUpdateTime(FaviconID icon_id, base::Time time); |
| 113 | 113 |
| 114 // Returns the id of the entry in the favicon database with the specified url | 114 // Returns the id of the entry in the favicon database with the specified url |
| 115 // and icon type. If |required_icon_type| contains multiple icon types and | 115 // and icon type. If |required_icon_type| contains multiple icon types and |
| 116 // there are more than one matched icon in database, only one icon will be | 116 // there are more than one matched icon in database, only one icon will be |
| 117 // returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and | 117 // returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and |
| 118 // FAVICON, and the icon type is returned in icon_type parameter if it is not | 118 // FAVICON, and the icon type is returned in icon_type parameter if it is not |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 const HistoryPublisher* history_publisher_; | 327 const HistoryPublisher* history_publisher_; |
| 328 | 328 |
| 329 // True if migration to TopSites has been done and the thumbnails | 329 // True if migration to TopSites has been done and the thumbnails |
| 330 // table should not be used. | 330 // table should not be used. |
| 331 bool use_top_sites_; | 331 bool use_top_sites_; |
| 332 }; | 332 }; |
| 333 | 333 |
| 334 } // namespace history | 334 } // namespace history |
| 335 | 335 |
| 336 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ | 336 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ |
| OLD | NEW |