diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-12 23:47:56 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-12 23:47:56 +0000 |
commit | 0ed4ad49845c6321bc88109b5dfd785bbf0edd63 (patch) | |
tree | 3599e95be5bb105f046e10ab621bbada052fd86a | |
parent | 22aae95df95ac05d0fe4bf5a206e5631ea9c3242 (diff) | |
download | chromium_src-0ed4ad49845c6321bc88109b5dfd785bbf0edd63.zip chromium_src-0ed4ad49845c6321bc88109b5dfd785bbf0edd63.tar.gz chromium_src-0ed4ad49845c6321bc88109b5dfd785bbf0edd63.tar.bz2 |
ntp: remove TODO after some tests
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7877008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100806 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/webui/ntp/favicon_webui_handler.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc index e584e2d..1d4bd17 100644 --- a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc +++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc @@ -87,12 +87,10 @@ void FaviconWebUIHandler::OnFaviconDataAvailable( int id = consumer_.GetClientData(favicon_service, request_handle); scoped_ptr<StringValue> color_value; - if (favicon.is_valid()) { - // TODO(estade): cache the response + if (favicon.is_valid()) color_value.reset(GetDominantColorCssString(favicon.image_data)); - } else { + else color_value.reset(new StringValue("#919191")); - } StringValue dom_id(dom_id_map_[id]); web_ui_->CallJavascriptFunction("ntp4.setStripeColor", dom_id, *color_value); @@ -126,9 +124,7 @@ void FaviconWebUIHandler::HandleGetAppIconDominantColor( void FaviconWebUIHandler::NotifyAppIconReady(const std::string& extension_id) { const SkBitmap& bitmap = app_icon_color_manager_->GetIcon(extension_id); - // TODO(gbillock): cache this? Probably call into it from the manager and - // cache the color there. Then call back to this method with the ext id - // and the color. + // TODO(estade): would be nice to avoid a round trip through png encoding. std::vector<unsigned char> bits; if (!gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &bits)) return; |