Code: void FaviconWebUIHandler::OnFaviconDataAvailable(
    FaviconService::Handle request_handle,
    history::FaviconData favicon) {
   FaviconService* favicon_service =
       web_ui_->GetProfile()->GetFaviconService(Profile::EXPLICIT_ACCESS);
   int id = consumer_.GetClientData(favicon_service, request_handle);
 
   if (favicon.is_valid()) {
    FundamentalValue id_value(id);
     color_utils::GridSampler sampler;
     SkColor color =
         color_utils::CalculateKMeanColorOfPNG(favicon.image_data, 100, 665,
                                              sampler);
    std::string css_color = base::StringPrintf("rgb(%d, %d, %d)",
                                                SkColorGetR(color),
                                                SkColorGetG(color),
                                                SkColorGetB(color));
    StringValue color_value(css_color);
    web_ui_->CallJavascriptFunction("ntp4.setFaviconDominantColor",
                                    id_value, color_value);
   }
 }

Vulnerability Type: DoS Overflow 
CWE ID: CWE-119
Summary: Google V8, as used in Google Chrome before 13.0.782.215, allows remote attackers to cause a denial of service or possibly have unspecified other impact via unknown vectors that trigger an out-of-bounds write.
Commit Message: ntp4: show larger favicons in most visited page

extend favicon source to provide larger icons. For now, larger means at most 32x32. Also, the only icon we actually support at this resolution is the default (globe).

BUG=none
TEST=manual

Review URL: http://codereview.chromium.org/7300017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91517 0039d316-1c4b-4281-b951-d872f2087c98