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

Unified Diff: ppapi/shared_impl/ppb_file_ref_shared.cc

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/ppb_file_ref_shared.cc
diff --git a/ppapi/shared_impl/ppb_file_ref_shared.cc b/ppapi/shared_impl/ppb_file_ref_shared.cc
index 64268b3b5c04500db796b16415adcc3680163196..118f45ce6e51869437d7f3fb578ec0fa3adf8b36 100644
--- a/ppapi/shared_impl/ppb_file_ref_shared.cc
+++ b/ppapi/shared_impl/ppb_file_ref_shared.cc
@@ -9,23 +9,16 @@
namespace ppapi {
-PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsImpl&,
+PPB_FileRef_Shared::PPB_FileRef_Shared(ResourceObjectType type,
const PPB_FileRef_CreateInfo& info)
- : Resource(info.resource.instance()),
- create_info_(info) {
- // Should not have been passed a host resource for the trusted constructor.
- DCHECK(info.resource.is_null());
-
- // Resource's constructor assigned a PP_Resource, so we can fill out our
- // host resource now.
- create_info_.resource = host_resource();
- DCHECK(!create_info_.resource.is_null());
-}
-
-PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsProxy&,
- const PPB_FileRef_CreateInfo& info)
- : Resource(info.resource),
+ : Resource(type, info.resource),
create_info_(info) {
+ if (type == OBJECT_IS_IMPL) {
+ // Resource's constructor assigned a PP_Resource, so we can fill out our
+ // host resource now.
+ create_info_.resource = host_resource();
+ DCHECK(!create_info_.resource.is_null());
+ }
}
PPB_FileRef_Shared::~PPB_FileRef_Shared() {

Powered by Google App Engine
This is Rietveld 408576698