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

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

Issue 1010783002: [Icons NTP] Working prototype to fetch, store, and display big icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaks and unit test fix. Created 5 years, 9 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 | chrome/common/favicon/fallback_icon_url_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/fallback_icon_source.cc
diff --git a/chrome/browser/ui/webui/fallback_icon_source.cc b/chrome/browser/ui/webui/fallback_icon_source.cc
index 78eae81ba79ec1e8721db6c977891c3795402c98..5ca47467cae8130073a120c0d03fd8897ccbfe39 100644
--- a/chrome/browser/ui/webui/fallback_icon_source.cc
+++ b/chrome/browser/ui/webui/fallback_icon_source.cc
@@ -15,6 +15,7 @@
#include "net/url_request/url_request.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/favicon_size.h"
+#include "url/gurl.h"
FallbackIconSource::FallbackIconSource() {
std::vector<std::string> font_list;
@@ -47,8 +48,11 @@ void FallbackIconSource::StartDataRequest(
SendDefaultResponse(callback);
return;
}
-
- GURL url(parsed.url());
+ GURL url(parsed.url_string());
+ if (url.is_empty() || !url.is_valid()) {
+ SendDefaultResponse(callback);
+ return;
+ }
std::vector<unsigned char> bitmap_data =
fallback_icon_service_->RenderFallbackIconBitmap(
url, parsed.size_in_pixels(), parsed.style());
« no previous file with comments | « no previous file | chrome/common/favicon/fallback_icon_url_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698