| Index: chrome/browser/dom_ui/dom_ui_favicon_source.cc
|
| diff --git a/chrome/browser/dom_ui/dom_ui_favicon_source.cc b/chrome/browser/dom_ui/dom_ui_favicon_source.cc
|
| index 5a52346a664cf956396931fb37010f3e3f38d366..55818a3040d4bb1e1ed667e1675c45bbf5ab5de9 100644
|
| --- a/chrome/browser/dom_ui/dom_ui_favicon_source.cc
|
| +++ b/chrome/browser/dom_ui/dom_ui_favicon_source.cc
|
| @@ -26,6 +26,11 @@ void DOMUIFavIconSource::StartDataRequest(const std::string& path,
|
| profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
|
| if (favicon_service) {
|
| FaviconService::Handle handle;
|
| + if (path.empty()) {
|
| + SendDefaultResponse(request_id);
|
| + return;
|
| + }
|
| +
|
| if (path.size() > 8 && path.substr(0, 8) == "iconurl/") {
|
| handle = favicon_service->GetFavicon(
|
| GURL(path.substr(8)),
|
| @@ -65,12 +70,16 @@ void DOMUIFavIconSource::OnFavIconDataAvailable(
|
| // Forward the data along to the networking system.
|
| SendResponse(request_id, data);
|
| } else {
|
| - if (!default_favicon_.get()) {
|
| - default_favicon_ =
|
| - ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| - IDR_DEFAULT_FAVICON);
|
| - }
|
| + SendDefaultResponse(request_id);
|
| + }
|
| +}
|
|
|
| - SendResponse(request_id, default_favicon_);
|
| +void DOMUIFavIconSource::SendDefaultResponse(int request_id) {
|
| + if (!default_favicon_.get()) {
|
| + default_favicon_ =
|
| + ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
| + IDR_DEFAULT_FAVICON);
|
| }
|
| +
|
| + SendResponse(request_id, default_favicon_);
|
| }
|
|
|