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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 518693002: Fix a crash when saving a <canvas> or <img> image which is large. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« content/common/view_messages.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 7c363459516c509561bd2b3ba38caa253d8b5acd..88c0e9e438fbd7462bc5e7b31e71290e647eb396 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1785,11 +1785,12 @@ void RenderFrameImpl::loadURLExternally(
if (policy == blink::WebNavigationPolicyDownload) {
render_view_->Send(new ViewHostMsg_DownloadUrl(render_view_->GetRoutingID(),
request.url(), referrer,
- suggested_name, false));
+ suggested_name));
} else if (policy == blink::WebNavigationPolicyDownloadTo) {
- render_view_->Send(new ViewHostMsg_DownloadUrl(render_view_->GetRoutingID(),
- request.url(), referrer,
- suggested_name, true));
+ render_view_->Send(
+ new ViewHostMsg_SaveImageAs(render_view_->GetRoutingID(),
+ request.url().string().utf8(),
Justin Novosad 2014/08/29 13:52:32 So you are just passing the URL as a string to wor
palmer 2014/08/30 00:37:29 I agree, just a byte vector is fine.
+ referrer, suggested_name));
} else {
OpenURL(frame, request.url(), referrer, policy);
}
« content/common/view_messages.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698