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

Unified Diff: components/ntp_tiles/icon_cacher_impl.cc

Issue 2725293002: Handle null callbacks in OnFaviconDownloaded (Closed)
Patch Set: Address comments Created 3 years, 10 months 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 | « components/ntp_tiles/icon_cacher.h ('k') | components/ntp_tiles/icon_cacher_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/icon_cacher_impl.cc
diff --git a/components/ntp_tiles/icon_cacher_impl.cc b/components/ntp_tiles/icon_cacher_impl.cc
index aa4e9118e50c5e67c084fa3c4de4f6db50f6784c..6c7076f85fa247e0e62d5fcdc0aae87f769412db 100644
--- a/components/ntp_tiles/icon_cacher_impl.cc
+++ b/components/ntp_tiles/icon_cacher_impl.cc
@@ -49,7 +49,6 @@ void IconCacherImpl::StartFetch(
PopularSites::Site site,
const base::Closure& icon_available,
const base::Closure& preliminary_icon_available) {
- DCHECK(!icon_available.is_null());
favicon::GetFaviconImageForPageURL(
favicon_service_, site.url, IconType(site),
base::Bind(&IconCacherImpl::OnGetFaviconImageForPageURLFinished,
@@ -85,7 +84,9 @@ void IconCacherImpl::OnFaviconDownloaded(PopularSites::Site site,
}
SaveIconForSite(site, fetched_image);
- icon_available.Run();
+ if (icon_available) {
+ icon_available.Run();
+ }
}
void IconCacherImpl::SaveIconForSite(const PopularSites::Site& site,
« no previous file with comments | « components/ntp_tiles/icon_cacher.h ('k') | components/ntp_tiles/icon_cacher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698