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

Unified Diff: ppapi/cpp/file_ref.cc

Issue 14188019: CRX FileSystem Pepper private API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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/cpp/file_ref.cc
diff --git a/ppapi/cpp/file_ref.cc b/ppapi/cpp/file_ref.cc
index 377fbbb04caeba6d52706acd681106a96771ee26..8f79baf9628b4f58af27abe868f054e57e7b486c 100644
--- a/ppapi/cpp/file_ref.cc
+++ b/ppapi/cpp/file_ref.cc
@@ -32,19 +32,23 @@ FileRef::FileRef(PassRef, PP_Resource resource) : Resource(PASS_REF, resource) {
FileRef::FileRef(const FileSystem& file_system,
const char* path) {
+ CommonCreate(file_system.pp_resource(), path);
+}
+
+FileRef::FileRef(const FileRef& other)
+ : Resource(other) {
+}
+
+void FileRef::CommonCreate(PP_Resource file_system_resource, const char* path) {
if (has_interface<PPB_FileRef_1_1>()) {
PassRefFromConstructor(get_interface<PPB_FileRef_1_1>()->Create(
- file_system.pp_resource(), path));
+ file_system_resource, path));
} else if (has_interface<PPB_FileRef_1_0>()) {
PassRefFromConstructor(get_interface<PPB_FileRef_1_0>()->Create(
- file_system.pp_resource(), path));
+ file_system_resource, path));
}
}
-FileRef::FileRef(const FileRef& other)
- : Resource(other) {
-}
-
PP_FileSystemType FileRef::GetFileSystemType() const {
if (has_interface<PPB_FileRef_1_1>())
return get_interface<PPB_FileRef_1_1>()->GetFileSystemType(pp_resource());

Powered by Google App Engine
This is Rietveld 408576698