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

Unified Diff: content/browser/renderer_host/pepper/pepper_file_system_browser_host.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 | « no previous file | content/renderer/pepper/pepper_file_io_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
index 76bff32bc2f7f44e3f8a4e519601a133f7311f10..11cae45b09ff0b4ca8a2d3e31cdee1d0f32634b2 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
@@ -14,6 +14,7 @@
#include "ppapi/host/dispatch_host_message.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/shared_impl/file_system_util.h"
#include "ppapi/shared_impl/file_type_conversion.h"
#include "webkit/browser/fileapi/file_system_context.h"
#include "webkit/browser/fileapi/file_system_operation_runner.h"
@@ -107,20 +108,10 @@ int32_t PepperFileSystemBrowserHost::OnHostMsgOpen(
return PP_ERROR_INPROGRESS;
called_open_ = true;
- fileapi::FileSystemType file_system_type;
- switch (type_) {
- case PP_FILESYSTEMTYPE_LOCALTEMPORARY:
- file_system_type = fileapi::kFileSystemTypeTemporary;
- break;
- case PP_FILESYSTEMTYPE_LOCALPERSISTENT:
- file_system_type = fileapi::kFileSystemTypePersistent;
- break;
- case PP_FILESYSTEMTYPE_EXTERNAL:
- file_system_type = fileapi::kFileSystemTypeExternal;
- break;
- default:
- return PP_ERROR_FAILED;
- }
+ fileapi::FileSystemType file_system_type =
+ ppapi::PepperFileSystemTypeToFileSystemType(type_);
+ if (file_system_type == fileapi::kFileSystemTypeUnknown)
+ return PP_ERROR_FAILED;
int render_process_id = 0;
int unused;
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_file_io_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698