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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 11746010: Cleanup history favicon code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « chrome/browser/history/history_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index 3cbd2b698bc9cce7ff8a44a311369e5c4a8817ae..8b066c039322fb9ebbcae775f66d8cae93757e65 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -425,12 +425,11 @@ struct PossibleTestSingletonTraits : public DefaultSingletonTraits<Type> {
void RunFaviconCallbackAsync(
const FaviconService::FaviconResultsCallback& callback,
- const std::vector<history::FaviconBitmapResult>* results,
- const history::IconURLSizesMap* size_map) {
+ const std::vector<history::FaviconBitmapResult>* results) {
base::MessageLoopProxy::current()->PostTask(
FROM_HERE,
base::Bind(&FaviconService::FaviconResultsCallbackRunner,
- callback, base::Owned(results), base::Owned(size_map)));
+ callback, base::Owned(results)));
}
} // namespace
@@ -510,15 +509,13 @@ void ChromeWebUIControllerFactory::GetFaviconForURL(
ExtensionWebUI::GetFaviconForURL(profile, url, callback);
#else
RunFaviconCallbackAsync(callback,
- new std::vector<history::FaviconBitmapResult>(),
- new history::IconURLSizesMap());
+ new std::vector<history::FaviconBitmapResult>());
#endif
return;
}
std::vector<history::FaviconBitmapResult>* favicon_bitmap_results =
new std::vector<history::FaviconBitmapResult>();
- history::IconURLSizesMap* icon_url_sizes = new history::IconURLSizesMap();
for (size_t i = 0; i < scale_factors.size(); ++i) {
scoped_refptr<base::RefCountedMemory> bitmap(GetFaviconResourceBytes(
@@ -539,18 +536,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL(
}
}
- // Populate IconURLSizesMap such that the requirement that all the icon URLs
- // in |favicon_bitmap_results| be present in |icon_url_sizes| holds.
- // Populate the favicon sizes with the pixel sizes of the bitmaps available
- // for |url|.
- for (size_t i = 0; i < favicon_bitmap_results->size(); ++i) {
- const history::FaviconBitmapResult& bitmap_result =
- (*favicon_bitmap_results)[i];
- const GURL& icon_url = bitmap_result.icon_url;
- (*icon_url_sizes)[icon_url].push_back(bitmap_result.pixel_size);
- }
-
- RunFaviconCallbackAsync(callback, favicon_bitmap_results, icon_url_sizes);
+ RunFaviconCallbackAsync(callback, favicon_bitmap_results);
}
// static
« no previous file with comments | « chrome/browser/history/history_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698