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

Unified Diff: net/base/data_url.cc

Issue 5542001: Allow data URLs to trigger downloads, as they do in Firefox.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | « net/base/data_url.h ('k') | webkit/glue/weburlloader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/data_url.cc
===================================================================
--- net/base/data_url.cc (revision 68044)
+++ net/base/data_url.cc (working copy)
@@ -60,6 +60,10 @@
if (charset->empty())
charset->assign("US-ASCII");
+ // The caller may not be interested in receiving the data.
+ if (!data)
+ return true;
+
// Preserve spaces if dealing with text or xml input, same as mozilla:
// https://bugzilla.mozilla.org/show_bug.cgi?id=138052
// but strip them otherwise:
« no previous file with comments | « net/base/data_url.h ('k') | webkit/glue/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698