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

Unified Diff: webkit/plugins/ppapi/ppb_url_loader_impl.h

Issue 11417145: Provide a safer URLLoader ReadResponseBody API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 | « ppapi/thunk/ppb_url_loader_thunk.cc ('k') | webkit/plugins/ppapi/ppb_url_loader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_url_loader_impl.h
diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.h b/webkit/plugins/ppapi/ppb_url_loader_impl.h
index aa1acfdd91afedb81b5f066a9ab00655cac0f051..ad3882c6fb21481361e9d22328d4565d8b351829 100644
--- a/webkit/plugins/ppapi/ppb_url_loader_impl.h
+++ b/webkit/plugins/ppapi/ppb_url_loader_impl.h
@@ -57,6 +57,10 @@ class PPB_URLLoader_Impl : public ::ppapi::Resource,
void* buffer,
int32_t bytes_to_read,
scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t ReadResponseBodyToArray(
+ int32_t max_read_length,
+ PP_ArrayOutput* array_output,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
virtual int32_t FinishStreamingToFile(
scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
virtual void Close() OVERRIDE;
@@ -66,6 +70,11 @@ class PPB_URLLoader_Impl : public ::ppapi::Resource,
virtual bool GetResponseInfoData(
::ppapi::URLResponseInfoData* data) OVERRIDE;
+ int32_t ReadResponseBodyInternal(
+ int32_t max_read_length,
+ const PP_ArrayOutput& array_output,
+ scoped_refptr< ::ppapi::TrackedCallback> callback);
+
// WebKit::WebURLLoaderClient implementation.
virtual void willSendRequest(WebKit::WebURLLoader* loader,
WebKit::WebURLRequest& new_request,
@@ -151,7 +160,7 @@ class PPB_URLLoader_Impl : public ::ppapi::Resource,
int64_t total_bytes_to_be_sent_;
int64_t bytes_received_;
int64_t total_bytes_to_be_received_;
- char* user_buffer_;
+ scoped_ptr<PP_ArrayOutput> user_buffer_;
size_t user_buffer_size_;
int32_t done_status_;
bool is_streaming_to_file_;
« no previous file with comments | « ppapi/thunk/ppb_url_loader_thunk.cc ('k') | webkit/plugins/ppapi/ppb_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698