| Index: chrome/browser/ui/webui/favicon_source.cc
|
| diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc
|
| index 3ba9befd28db94fc693db9d3923969d40d474298..b2fe5f9913f7f276bb8b8736279fcc0e1e00bd61 100644
|
| --- a/chrome/browser/ui/webui/favicon_source.cc
|
| +++ b/chrome/browser/ui/webui/favicon_source.cc
|
| @@ -15,6 +15,7 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/layout.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| +#include "ui/gfx/favicon_size.h"
|
|
|
| FaviconSource::FaviconSource(Profile* profile, IconType type)
|
| : DataSource(type == FAVICON ? chrome::kChromeUIFaviconHost :
|
| @@ -53,9 +54,11 @@ void FaviconSource::StartDataRequest(const std::string& path,
|
| FaviconService::Handle handle;
|
| if (path.size() > 8 && path.substr(0, 8) == "iconurl/") {
|
| // TODO : Change GetFavicon to support combination of IconType.
|
| - handle = favicon_service->GetFavicon(
|
| + handle = favicon_service->GetRawFavicon(
|
| GURL(path.substr(8)),
|
| history::FAVICON,
|
| + gfx::kFaviconSize,
|
| + ui::SCALE_FACTOR_100P,
|
| &cancelable_consumer_,
|
| base::Bind(&FaviconSource::OnFaviconDataAvailable,
|
| base::Unretained(this)));
|
| @@ -105,10 +108,12 @@ void FaviconSource::StartDataRequest(const std::string& path,
|
| }
|
|
|
| // TODO(estade): fetch the requested size.
|
| - handle = favicon_service->GetFaviconForURL(
|
| + handle = favicon_service->GetRawFaviconForURL(
|
| profile_,
|
| url,
|
| icon_types_,
|
| + gfx::kFaviconSize,
|
| + ui::SCALE_FACTOR_100P,
|
| &cancelable_consumer_,
|
| base::Bind(&FaviconSource::OnFaviconDataAvailable,
|
| base::Unretained(this)));
|
| @@ -132,15 +137,15 @@ bool FaviconSource::ShouldReplaceExistingSource() const {
|
|
|
| void FaviconSource::OnFaviconDataAvailable(
|
| FaviconService::Handle request_handle,
|
| - history::FaviconData favicon) {
|
| + const history::FaviconBitmapResult& bitmap_result) {
|
| FaviconService* favicon_service =
|
| FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS);
|
| int request_id = cancelable_consumer_.GetClientData(favicon_service,
|
| request_handle);
|
|
|
| - if (favicon.is_valid()) {
|
| + if (bitmap_result.is_valid()) {
|
| // Forward the data along to the networking system.
|
| - SendResponse(request_id, favicon.image_data);
|
| + SendResponse(request_id, bitmap_result.bitmap_data);
|
| } else {
|
| SendDefaultResponse(request_id);
|
| }
|
|
|