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

Unified Diff: trunk/src/ppapi/shared_impl/url_request_info_data.h

Issue 23462016: Revert 219911 "Pepper: Move FileRef to the "new" resource proxy." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
Index: trunk/src/ppapi/shared_impl/url_request_info_data.h
===================================================================
--- trunk/src/ppapi/shared_impl/url_request_info_data.h (revision 220164)
+++ trunk/src/ppapi/shared_impl/url_request_info_data.h (working copy)
@@ -9,12 +9,10 @@
#include <vector>
#include "base/memory/ref_counted.h"
-#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"
-#include "ppapi/shared_impl/ppapi_globals.h"
+#include "ppapi/shared_impl/host_resource.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
-#include "ppapi/shared_impl/resource_tracker.h"
namespace ppapi {
@@ -34,12 +32,19 @@
std::string data;
- // Only set on the plugin-side, for refcounting purposes. Only valid when
- // |is_file| is set.
- scoped_refptr<Resource> file_ref_resource;
- // This struct holds no ref to this resource. Only valid when |is_file| is
- // set.
- PP_Resource file_ref_pp_resource;
+ // Is is_file is set, these variables are set. Note that the resource
+ // may still be NULL in some cases, such as deserialization errors.
+ //
+ // This is a bit tricky. In the plugin side of the proxy, both the file ref
+ // and the file_ref_host_resource will be set and valid. The scoped_refptr
+ // ensures that the resource is alive for as long as the BodyItem is.
+ //
+ // When we deserialize this in the renderer, only the
+ // file_ref_host_resource's are serialized over IPC. The file_refs won't be
+ // valid until the host resources are converted to Resource pointers in the
+ // PPB_URLRequestInfo_Impl.
+ scoped_refptr<Resource> file_ref;
+ HostResource file_ref_host_resource;
int64_t start_offset;
int64_t number_of_bytes;
« no previous file with comments | « trunk/src/ppapi/shared_impl/ppb_file_ref_shared.cc ('k') | trunk/src/ppapi/shared_impl/url_request_info_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698