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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2880723002: Favicon url is used only if it is valid (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index ef9d4bd1dcc9b4acf23e91bbe6b490f279f3ff7c..a434d4a192cff28ef218ac6a78ef500153543b58 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -2563,8 +2563,10 @@ registerLoadRequestForURL:(const GURL&)requestURL
icon_type = web::FaviconURL::TOUCH_ICON;
else if (rel == "apple-touch-icon-precomposed")
icon_type = web::FaviconURL::TOUCH_PRECOMPOSED_ICON;
- urls.push_back(
- web::FaviconURL(GURL(href), icon_type, std::vector<gfx::Size>()));
+ GURL url = GURL(href);
Eugene But (OOO till 7-30) 2017/05/12 15:04:08 WebContentsObserver also has DidUpdateFaviconURL.
gambard 2017/05/12 15:43:39 There is a check if the URL is empty https://cs.ch
+ if (url.is_valid()) {
+ urls.push_back(web::FaviconURL(url, icon_type, std::vector<gfx::Size>()));
+ }
}
if (!urls.empty())
_webStateImpl->OnFaviconUrlUpdated(urls);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698