Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1803)

Unified Diff: chrome/browser/ui/webui/favicon_source.cc

Issue 2535463002: [Favicon] Stop caching the default favicon (Closed)
Patch Set: Remove the caching Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/favicon_source.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8ecedfbd5dfe03c668431458efc1ae3d7bd20189..3078d63e06f21142cd5efa3999fe7d05a41f290a 100644
--- a/chrome/browser/ui/webui/favicon_source.cc
+++ b/chrome/browser/ui/webui/favicon_source.cc
@@ -194,17 +194,12 @@ void FaviconSource::SendDefaultResponse(const IconRequest& icon_request) {
resource_id = IDR_DEFAULT_FAVICON;
break;
}
+
+ ui::ScaleFactor resource_scale_factor =
+ ui::GetSupportedScaleFactor(icon_request.device_scale_factor);
Peter Kasting 2016/12/02 21:27:01 Nit: I'd just inline this below.
base::RefCountedMemory* default_favicon =
- default_favicons_[favicon_index].get();
-
- if (!default_favicon) {
- ui::ScaleFactor resource_scale_factor =
- ui::GetSupportedScaleFactor(icon_request.device_scale_factor);
- default_favicon =
- ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
- resource_id, resource_scale_factor);
- default_favicons_[favicon_index] = default_favicon;
- }
+ ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
+ resource_id, resource_scale_factor);
icon_request.callback.Run(default_favicon);
}
« no previous file with comments | « chrome/browser/ui/webui/favicon_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698