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

Unified Diff: ppapi/shared_impl/scoped_pp_resource.h

Issue 7706021: Convert FileRefImpl and URLRequestInfo to shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests fixed Created 9 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/shared_impl/scoped_pp_resource.h
diff --git a/ppapi/shared_impl/scoped_pp_resource.h b/ppapi/shared_impl/scoped_pp_resource.h
index 74cb9eb2d8cf853f1f17b4c0922e1a3cad872e2b..96db4ee1414ae9d84152152ee515dd4c33517578 100644
--- a/ppapi/shared_impl/scoped_pp_resource.h
+++ b/ppapi/shared_impl/scoped_pp_resource.h
@@ -14,11 +14,16 @@ class Resource;
// This is a version of scoped_refptr but for PP_Resources.
class ScopedPPResource {
public:
+ struct PassRef {};
+
ScopedPPResource();
// Takes one reference to the given resource.
explicit ScopedPPResource(PP_Resource resource);
+ // Assumes responsibility for one ref that the resource already has.
+ explicit ScopedPPResource(const PassRef&, PP_Resource resource);
+
// Helper to get the PP_Resource out of the given object and take a reference
// to it.
explicit ScopedPPResource(Resource* resource);

Powered by Google App Engine
This is Rietveld 408576698