Chromium Code Reviews| 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) { |