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..31be637edc772df949c7af0dae31d2e2e20c7df7 100644 |
--- a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc |
@@ -119,16 +119,18 @@ void FaviconWebUIHandler::HandleGetFaviconDominantColor(const ListValue* args) { |
void FaviconWebUIHandler::OnFaviconDataAvailable( |
FaviconService::Handle request_handle, |
- history::FaviconData favicon) { |
+ history::FaviconData favicon_data) { |
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)); |
- else |
+ if (favicon_data.is_valid()) { |
+ const history::FaviconDataElement& element = favicon_data.elements[0]; |
+ color_value.reset(GetDominantColorCssString(element.bitmap_data)); |
+ } else { |
color_value.reset(new StringValue("#919191")); |
+ } |
StringValue dom_id(dom_id_map_[id]); |
web_ui()->CallJavascriptFunction("ntp.setStripeColor", dom_id, *color_value); |