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

Unified Diff: ppapi/proxy/file_io_resource.cc

Issue 58853009: Pepper: Add shared Utilities for file systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add IsValid function. Created 7 years, 1 month 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/ppapi_shared.gypi ('k') | ppapi/shared_impl/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/file_io_resource.cc
diff --git a/ppapi/proxy/file_io_resource.cc b/ppapi/proxy/file_io_resource.cc
index 347d4ef89168fd5102ef4cf8184e427155c58925..363bdaef1678901bcb555538dfb8cc0ddcee42c3 100644
--- a/ppapi/proxy/file_io_resource.cc
+++ b/ppapi/proxy/file_io_resource.cc
@@ -10,6 +10,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/array_writer.h"
+#include "ppapi/shared_impl/file_system_util.h"
#include "ppapi/shared_impl/file_type_conversion.h"
#include "ppapi/shared_impl/ppapi_globals.h"
#include "ppapi/shared_impl/proxy_lock.h"
@@ -97,10 +98,7 @@ int32_t FileIOResource::Open(PP_Resource file_ref,
PPB_FileRef_API* file_ref_api = enter.object();
PP_FileSystemType type = file_ref_api->GetFileSystemType();
- if (type != PP_FILESYSTEMTYPE_LOCALPERSISTENT &&
- type != PP_FILESYSTEMTYPE_LOCALTEMPORARY &&
- type != PP_FILESYSTEMTYPE_EXTERNAL &&
- type != PP_FILESYSTEMTYPE_ISOLATED) {
+ if (!FileSystemTypeIsValid(type)) {
NOTREACHED();
return PP_ERROR_FAILED;
}
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/shared_impl/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698