| 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 // Updates the page and icon mapping for the given mapping_id with the given | 198 // Updates the page and icon mapping for the given mapping_id with the given |
| 199 // icon_id. | 199 // icon_id. |
| 200 // Returns true if the update succeeded. | 200 // Returns true if the update succeeded. |
| 201 bool UpdateIconMapping(IconMappingID mapping_id, FaviconID icon_id); | 201 bool UpdateIconMapping(IconMappingID mapping_id, FaviconID icon_id); |
| 202 | 202 |
| 203 // Deletes the icon mapping entries for the given page url. | 203 // Deletes the icon mapping entries for the given page url. |
| 204 // Returns true if the deletion succeeded. | 204 // Returns true if the deletion succeeded. |
| 205 bool DeleteIconMappings(const GURL& page_url); | 205 bool DeleteIconMappings(const GURL& page_url); |
| 206 | 206 |
| 207 // Deletes the icon mapping with |mapping_id|. |
| 208 // Returns true if the deletion succeeded. |
| 209 bool DeleteIconMapping(IconMappingID mapping_id); |
| 210 |
| 207 // Checks whether a favicon is used by any URLs in the database. | 211 // Checks whether a favicon is used by any URLs in the database. |
| 208 bool HasMappingFor(FaviconID id); | 212 bool HasMappingFor(FaviconID id); |
| 209 | 213 |
| 210 // Clones the existing mappings from |old_page_url| if |new_page_url| has no | 214 // Clones the existing mappings from |old_page_url| if |new_page_url| has no |
| 211 // mappings. Otherwise, will leave mappings alone. | 215 // mappings. Otherwise, will leave mappings alone. |
| 212 bool CloneIconMappings(const GURL& old_page_url, const GURL& new_page_url); | 216 bool CloneIconMappings(const GURL& old_page_url, const GURL& new_page_url); |
| 213 | 217 |
| 214 // The class to enumerate icon mappings. Use InitIconMappingEnumerator to | 218 // The class to enumerate icon mappings. Use InitIconMappingEnumerator to |
| 215 // initialize. | 219 // initialize. |
| 216 class IconMappingEnumerator { | 220 class IconMappingEnumerator { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 const HistoryPublisher* history_publisher_; | 385 const HistoryPublisher* history_publisher_; |
| 382 | 386 |
| 383 // True if migration to TopSites has been done and the thumbnails | 387 // True if migration to TopSites has been done and the thumbnails |
| 384 // table should not be used. | 388 // table should not be used. |
| 385 bool use_top_sites_; | 389 bool use_top_sites_; |
| 386 }; | 390 }; |
| 387 | 391 |
| 388 } // namespace history | 392 } // namespace history |
| 389 | 393 |
| 390 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ | 394 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ |
| OLD | NEW |