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

Unified Diff: content/renderer/render_view.cc

Issue 7484061: Use the suggested name from an anchor's 'download' attribute. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2011 Created 9 years, 5 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: content/renderer/render_view.cc
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index 1eeeb773153494d3cd70102a1a9d02fc0e50842a..21677bb80b0d09e8c0815d9948262f788754754d 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -1979,9 +1979,17 @@ void RenderView::willClose(WebFrame* frame) {
void RenderView::loadURLExternally(
WebFrame* frame, const WebURLRequest& request,
WebNavigationPolicy policy) {
+ loadURLExternally(frame, request, policy, WebString());
+}
+
+void RenderView::loadURLExternally(
+ WebFrame* frame, const WebURLRequest& request,
+ WebNavigationPolicy policy,
+ const WebString& suggested_name) {
GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer")));
if (policy == WebKit::WebNavigationPolicyDownload) {
- Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer));
+ Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer,
+ suggested_name));
} else {
OpenURL(request.url(), referrer, policy);
}
« chrome/browser/download/download_create_info.h ('K') | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698