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

Unified Diff: chrome/browser/history/thumbnail_database.cc

Issue 26563004: Find Favicon in priority of icon_type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a new method Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/thumbnail_database.cc
diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc
index 05a72a43c0e91b405ebe891cb7bebf478a84b06b..8bc97aa7441a52fdf76d5c4371aad1635ea72676 100644
--- a/chrome/browser/history/thumbnail_database.cc
+++ b/chrome/browser/history/thumbnail_database.cc
@@ -1085,6 +1085,25 @@ bool ThumbnailDatabase::GetIconMappingsForPageURL(
return result;
}
+bool ThumbnailDatabase::GetAllIconMappingsForPageURL(
sky 2013/10/15 15:03:47 This is practically the same as GetIconMappingsFor
michaelbai 2013/10/15 19:36:31 Remove this method, move the logic to HistoryBacke
+ const GURL& page_url,
pkotwicz 2013/10/15 16:44:33 Could you use the version of GetIconMappingsForPag
michaelbai 2013/10/15 19:36:31 Done.
+ int required_icon_types,
+ std::vector<IconMapping>* mapping_data) {
+ std::vector<IconMapping> all_mapping_data;
+ if (!GetIconMappingsForPageURL(page_url, &all_mapping_data))
+ return false;
+
+ bool result = false;
+ for (std::vector<IconMapping>::iterator m = all_mapping_data.begin();
+ m != all_mapping_data.end(); ++m) {
+ if (m->icon_type & required_icon_types) {
+ result = true;
+ mapping_data->push_back(*m);
+ }
+ }
+ return result;
+}
+
bool ThumbnailDatabase::GetIconMappingsForPageURL(
const GURL& page_url,
std::vector<IconMapping>* mapping_data) {
« chrome/browser/history/history_service.cc ('K') | « chrome/browser/history/thumbnail_database.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698