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

Unified Diff: ppapi/cpp/file_ref.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE 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
« no previous file with comments | « ppapi/cpp/file_ref.h ('k') | ppapi/cpp/file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/file_ref.cc
diff --git a/ppapi/cpp/file_ref.cc b/ppapi/cpp/file_ref.cc
index ed98974ce1049df7626cf0e21ff6c72059a0a092..864e646909c9e7cce7f8c02bec99e8d3161eb853 100644
--- a/ppapi/cpp/file_ref.cc
+++ b/ppapi/cpp/file_ref.cc
@@ -23,8 +23,7 @@ template <> const char* interface_name<PPB_FileRef>() {
FileRef::FileRef(PP_Resource resource) : Resource(resource) {
}
-FileRef::FileRef(PassRef, PP_Resource resource) {
- PassRefFromConstructor(resource);
+FileRef::FileRef(PassRef, PP_Resource resource) : Resource(PASS_REF, resource) {
}
FileRef::FileRef(const FileSystem& file_system,
@@ -48,23 +47,20 @@ PP_FileSystemType FileRef::GetFileSystemType() const {
Var FileRef::GetName() const {
if (!has_interface<PPB_FileRef>())
return Var();
- return Var(Var::PassRef(),
- get_interface<PPB_FileRef>()->GetName(pp_resource()));
+ return Var(PASS_REF, get_interface<PPB_FileRef>()->GetName(pp_resource()));
}
Var FileRef::GetPath() const {
if (!has_interface<PPB_FileRef>())
return Var();
- return Var(Var::PassRef(),
- get_interface<PPB_FileRef>()->GetPath(pp_resource()));
+ return Var(PASS_REF, get_interface<PPB_FileRef>()->GetPath(pp_resource()));
}
FileRef FileRef::GetParent() const {
if (!has_interface<PPB_FileRef>())
return FileRef();
- return FileRef(PassRef(),
- get_interface<PPB_FileRef>()->GetParent(
- pp_resource()));
+ return FileRef(PASS_REF,
+ get_interface<PPB_FileRef>()->GetParent(pp_resource()));
}
int32_t FileRef::MakeDirectory(const CompletionCallback& cc) {
« no previous file with comments | « ppapi/cpp/file_ref.h ('k') | ppapi/cpp/file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698