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

Unified Diff: ppapi/proxy/url_response_info_resource.cc

Issue 21966004: Pepper: Move FileRef to the "new" resource proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CreateInfo/DetailedInfo rename 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: ppapi/proxy/url_response_info_resource.cc
diff --git a/ppapi/proxy/url_response_info_resource.cc b/ppapi/proxy/url_response_info_resource.cc
index 85dae9a1aef485c989fa39d30a674bd805ff8515..85a4776dd89353ee7a8499a8a03dcd1a3862b4ed 100644
--- a/ppapi/proxy/url_response_info_resource.cc
+++ b/ppapi/proxy/url_response_info_resource.cc
@@ -4,7 +4,7 @@
#include "ppapi/proxy/url_response_info_resource.h"
-#include "ppapi/proxy/ppb_file_ref_proxy.h"
+#include "ppapi/proxy/file_ref_resource.h"
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/resource_creation_api.h"
@@ -62,8 +62,12 @@ PP_Var URLResponseInfoResource::GetProperty(PP_URLResponseProperty property) {
}
PP_Resource URLResponseInfoResource::GetBodyAsFileRef() {
- if (!body_as_file_ref_.get())
- return 0;
+ if (!body_as_file_ref_.get()) {
+ body_as_file_ref_ = FileRefResource::CreateFileRef(
yzshen1 2013/08/08 23:16:21 What if the response is not streamed to a file?
teravest 2013/08/09 02:00:08 I don't know what I was thinking here. Changed to
+ connection(),
+ pp_instance(),
+ data_.body_as_file_ref);
+ }
PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(
body_as_file_ref_.get());
return body_as_file_ref_.get();

Powered by Google App Engine
This is Rietveld 408576698