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

Unified Diff: content/browser/renderer_host/render_message_filter.h

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: CONTENT_EXPORT Created 6 years, 3 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/browser/renderer_host/render_message_filter.h
diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h
index 9328986245c9dc4417d367cc67a93867f8d837d2..0e5776f6ea5a870afdf36fa8ceb11a5761398bb6 100644
--- a/content/browser/renderer_host/render_message_filter.h
+++ b/content/browser/renderer_host/render_message_filter.h
@@ -87,7 +87,7 @@ struct WebPluginInfo;
// This class filters out incoming IPC messages for the renderer process on the
// IPC thread.
-class RenderMessageFilter : public BrowserMessageFilter {
+class CONTENT_EXPORT RenderMessageFilter : public BrowserMessageFilter {
zino 2014/09/17 06:30:44 I think we should expose this class for using in u
public:
// Create the filter.
RenderMessageFilter(int render_process_id,
@@ -118,14 +118,22 @@ class RenderMessageFilter : public BrowserMessageFilter {
// Only call on the IO thread.
net::CookieStore* GetCookieStoreForURL(const GURL& url);
+ protected:
+ virtual ~RenderMessageFilter();
+
+ // This method will be overridden by TestSaveImageFromDataURL class for test.
+ virtual void DownloadUrl(int render_view_id,
+ const GURL& url,
+ const Referrer& referrer,
+ const base::string16& suggested_name,
+ const bool use_prompt) const;
+
private:
friend class BrowserThread;
friend class base::DeleteHelper<RenderMessageFilter>;
class OpenChannelToNpapiPluginCallback;
- virtual ~RenderMessageFilter();
-
void OnGetProcessMemorySizes(size_t* private_bytes, size_t* shared_bytes);
void OnCreateWindow(const ViewHostMsg_CreateWindow_Params& params,
int* route_id,
@@ -201,8 +209,8 @@ class RenderMessageFilter : public BrowserMessageFilter {
void OnDownloadUrl(int render_view_id,
const GURL& url,
const Referrer& referrer,
- const base::string16& suggested_name,
- const bool use_prompt);
+ const base::string16& suggested_name);
+ void OnSaveImageFromDataURL(int render_view_id, const std::string& url_str);
void OnCheckNotificationPermission(const GURL& source_origin,
int* permission_level);

Powered by Google App Engine
This is Rietveld 408576698