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

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: 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
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..6cd2b026bc59d8c88bd5c8143d230e5181cf806b 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());

Powered by Google App Engine
This is Rietveld 408576698