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

Unified Diff: chrome/browser/ui/webui/ntp/favicon_webui_handler.cc

Issue 10870022: Change FaviconData to be able to return data for multiple bitmaps for same icon URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/ui/webui/ntp/favicon_webui_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
index 1002ddd2eca6082c4a130f393d9ce3704f11674f..8ecc7852573e84ae6075e5261021c4002c8cdda4 100644
--- a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
+++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
@@ -119,14 +119,15 @@ void FaviconWebUIHandler::HandleGetFaviconDominantColor(const ListValue* args) {
void FaviconWebUIHandler::OnFaviconDataAvailable(
FaviconService::Handle request_handle,
- history::FaviconData favicon) {
+ history::FaviconData favicon_data,
+ std::vector<GURL> icon_urls_in_db) {
FaviconService* favicon_service =
Profile::FromWebUI(web_ui())->GetFaviconService(Profile::EXPLICIT_ACCESS);
int id = consumer_.GetClientData(favicon_service, request_handle);
scoped_ptr<StringValue> color_value;
- if (favicon.is_valid())
- color_value.reset(GetDominantColorCssString(favicon.image_data));
+ if (favicon_data.has_valid_bitmaps())
+ color_value.reset(GetDominantColorCssString(favicon_data.first_bitmap()));
else
color_value.reset(new StringValue("#919191"));

Powered by Google App Engine
This is Rietveld 408576698