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

Unified Diff: content/renderer/pepper/pepper_file_system_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 | « content/renderer/pepper/pepper_file_io_host.cc ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_file_system_host.cc
diff --git a/content/renderer/pepper/pepper_file_system_host.cc b/content/renderer/pepper/pepper_file_system_host.cc
index c41fc63ed5cd171b3050a4550af3e948c691b7d3..a78a2c7f52a010c93893a1374bb40526c404d1e9 100644
--- a/content/renderer/pepper/pepper_file_system_host.cc
+++ b/content/renderer/pepper/pepper_file_system_host.cc
@@ -15,6 +15,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 "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
@@ -97,20 +98,10 @@ int32_t PepperFileSystemHost::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;
GURL document_url = renderer_ppapi_host_->GetDocumentURL(pp_instance());
if (!document_url.is_valid())
« no previous file with comments | « content/renderer/pepper/pepper_file_io_host.cc ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698