| OLD | NEW |
| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Returns true if the update succeeded. | 158 // Returns true if the update succeeded. |
| 159 bool UpdateIconMapping(IconMappingID mapping_id, FaviconID icon_id); | 159 bool UpdateIconMapping(IconMappingID mapping_id, FaviconID icon_id); |
| 160 | 160 |
| 161 // Deletes the icon mapping entries for the given page url. | 161 // Deletes the icon mapping entries for the given page url. |
| 162 // Returns true if the deletion succeeded. | 162 // Returns true if the deletion succeeded. |
| 163 bool DeleteIconMappings(const GURL& page_url); | 163 bool DeleteIconMappings(const GURL& page_url); |
| 164 | 164 |
| 165 // Checks whether a favicon is used by any URLs in the database. | 165 // Checks whether a favicon is used by any URLs in the database. |
| 166 bool HasMappingFor(FaviconID id); | 166 bool HasMappingFor(FaviconID id); |
| 167 | 167 |
| 168 // Clones the existing mappings from |old_page_url| if |new_page_url| has no |
| 169 // mappings. Otherwise, will leave mappings alone. |
| 170 bool CloneIconMapping(const GURL& old_page_url, const GURL& new_page_url); |
| 171 |
| 168 // Temporary IconMapping ----------------------------------------------------- | 172 // Temporary IconMapping ----------------------------------------------------- |
| 169 // | 173 // |
| 170 // Creates a temporary table to store icon mapping. Icon mapping will be | 174 // Creates a temporary table to store icon mapping. Icon mapping will be |
| 171 // copied to this table by AddToTemporaryIconMappingTable() and then the | 175 // copied to this table by AddToTemporaryIconMappingTable() and then the |
| 172 // original table will be dropped, leaving only those copied mapping | 176 // original table will be dropped, leaving only those copied mapping |
| 173 // remaining. This is used to quickly delete most of the icon mapping when | 177 // remaining. This is used to quickly delete most of the icon mapping when |
| 174 // clearing history. | 178 // clearing history. |
| 175 bool InitTemporaryIconMappingTable() { | 179 bool InitTemporaryIconMappingTable() { |
| 176 return InitIconMappingTable(&db_, true); | 180 return InitIconMappingTable(&db_, true); |
| 177 } | 181 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 const HistoryPublisher* history_publisher_; | 295 const HistoryPublisher* history_publisher_; |
| 292 | 296 |
| 293 // True if migration to TopSites has been done and the thumbnails | 297 // True if migration to TopSites has been done and the thumbnails |
| 294 // table should not be used. | 298 // table should not be used. |
| 295 bool use_top_sites_; | 299 bool use_top_sites_; |
| 296 }; | 300 }; |
| 297 | 301 |
| 298 } // namespace history | 302 } // namespace history |
| 299 | 303 |
| 300 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ | 304 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ |
| OLD | NEW |