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

Side by Side Diff: components/history/core/browser/thumbnail_database.h

Issue 1055173003: Remove unused ThumbnailDatabase::UpdateIconMapping() and ThumbnailDatabase::CloneIconMappings() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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
OLDNEW
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 COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // All matched icon mappings are returned in descent order of IconType if 183 // All matched icon mappings are returned in descent order of IconType if
184 // mapping_data is not NULL. 184 // mapping_data is not NULL.
185 bool GetIconMappingsForPageURL(const GURL& page_url, 185 bool GetIconMappingsForPageURL(const GURL& page_url,
186 std::vector<IconMapping>* mapping_data); 186 std::vector<IconMapping>* mapping_data);
187 187
188 // Adds a mapping between the given page_url and icon_id. 188 // Adds a mapping between the given page_url and icon_id.
189 // Returns the new mapping id if the adding succeeds, otherwise 0 is returned. 189 // Returns the new mapping id if the adding succeeds, otherwise 0 is returned.
190 IconMappingID AddIconMapping(const GURL& page_url, 190 IconMappingID AddIconMapping(const GURL& page_url,
191 favicon_base::FaviconID icon_id); 191 favicon_base::FaviconID icon_id);
192 192
193 // Updates the page and icon mapping for the given mapping_id with the given
194 // icon_id.
195 // Returns true if the update succeeded.
196 bool UpdateIconMapping(IconMappingID mapping_id,
197 favicon_base::FaviconID icon_id);
198
199 // Deletes the icon mapping entries for the given page url. 193 // Deletes the icon mapping entries for the given page url.
200 // Returns true if the deletion succeeded. 194 // Returns true if the deletion succeeded.
201 bool DeleteIconMappings(const GURL& page_url); 195 bool DeleteIconMappings(const GURL& page_url);
202 196
203 // Deletes the icon mapping with |mapping_id|. 197 // Deletes the icon mapping with |mapping_id|.
204 // Returns true if the deletion succeeded. 198 // Returns true if the deletion succeeded.
205 bool DeleteIconMapping(IconMappingID mapping_id); 199 bool DeleteIconMapping(IconMappingID mapping_id);
206 200
207 // Checks whether a favicon is used by any URLs in the database. 201 // Checks whether a favicon is used by any URLs in the database.
208 bool HasMappingFor(favicon_base::FaviconID id); 202 bool HasMappingFor(favicon_base::FaviconID id);
209 203
210 // Clones the existing mappings from |old_page_url| if |new_page_url| has no
211 // mappings. Otherwise, will leave mappings alone.
212 bool CloneIconMappings(const GURL& old_page_url, const GURL& new_page_url);
213
214 // The class to enumerate icon mappings. Use InitIconMappingEnumerator to 204 // The class to enumerate icon mappings. Use InitIconMappingEnumerator to
215 // initialize. 205 // initialize.
216 class IconMappingEnumerator { 206 class IconMappingEnumerator {
217 public: 207 public:
218 IconMappingEnumerator(); 208 IconMappingEnumerator();
219 ~IconMappingEnumerator(); 209 ~IconMappingEnumerator();
220 210
221 // Get the next icon mapping, return false if no more are available. 211 // Get the next icon mapping, return false if no more are available.
222 bool GetNextIconMapping(IconMapping* icon_mapping); 212 bool GetNextIconMapping(IconMapping* icon_mapping);
223 213
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 269
280 sql::Connection db_; 270 sql::Connection db_;
281 sql::MetaTable meta_table_; 271 sql::MetaTable meta_table_;
282 272
283 HistoryClient* history_client_; 273 HistoryClient* history_client_;
284 }; 274 };
285 275
286 } // namespace history 276 } // namespace history
287 277
288 #endif // COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_ 278 #endif // COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_
OLDNEW
« no previous file with comments | « components/history/core/browser/history_service.cc ('k') | components/history/core/browser/thumbnail_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698