Skip to content

Commit

Permalink
Revert 247473 "PPAPI: Implement PPB_FileMapping on POSIX"
Browse files Browse the repository at this point in the history
> PPAPI: Implement PPB_FileMapping on POSIX
> 
> BUG=83774
> R=bbudge@chromium.org
> 
> Review URL: https://codereview.chromium.org/69663002

TBR=dmichael@chromium.org

Review URL: https://codereview.chromium.org/144383006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247477 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dmichael@chromium.org committed Jan 28, 2014
1 parent 7c900e3 commit dd565bb
Show file tree
Hide file tree
Showing 26 changed files with 13 additions and 1,111 deletions.
1 change: 0 additions & 1 deletion chrome/browser/component_updater/ppapi_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "ppapi/c/ppb_console.h"
#include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppb_file_io.h"
#include "ppapi/c/ppb_file_mapping.h"
#include "ppapi/c/ppb_file_ref.h"
#include "ppapi/c/ppb_file_system.h"
#include "ppapi/c/ppb_fullscreen.h"
Expand Down
10 changes: 0 additions & 10 deletions chrome/test/ppapi/ppapi_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -971,16 +971,6 @@ IN_PROC_BROWSER_TEST_F(PPAPIPrivateNaClPNaClTest, MAYBE_PNaCl_FileIO_Private) {
);
}

// PPB_FileMapping is only implemented on POSIX currently.
// http://crbug.com/83774
#if defined(OS_WIN)
#define MAYBE_FileMapping DISABLED_FileMapping
#else
#define MAYBE_FileMapping FileMapping
#endif
TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_FileMapping)
TEST_PPAPI_NACL(MAYBE_FileMapping)

// Note, the FileRef tests are split into two, because all of them together
// sometimes take too long on windows: crbug.com/336999
IN_PROC_BROWSER_TEST_F(PPAPITest, FileRef1) {
Expand Down
1 change: 0 additions & 1 deletion content/renderer/pepper/pepper_plugin_instance_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2402,7 +2402,6 @@ ppapi::Resource* PepperPluginInstanceImpl::GetSingletonResource(
case ppapi::BROKER_SINGLETON_ID:
case ppapi::BROWSER_FONT_SINGLETON_ID:
case ppapi::EXTENSIONS_COMMON_SINGLETON_ID:
case ppapi::FILE_MAPPING_SINGLETON_ID:
case ppapi::FLASH_CLIPBOARD_SINGLETON_ID:
case ppapi::FLASH_FILE_SINGLETON_ID:
case ppapi::FLASH_FULLSCREEN_SINGLETON_ID:
Expand Down
1 change: 0 additions & 1 deletion content/renderer/pepper/plugin_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
#include "ppapi/c/ppb_console.h"
#include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppb_file_io.h"
#include "ppapi/c/ppb_file_mapping.h"
#include "ppapi/c/ppb_file_ref.h"
#include "ppapi/c/ppb_file_system.h"
#include "ppapi/c/ppb_fullscreen.h"
Expand Down
2 changes: 0 additions & 2 deletions ppapi/api/ppb_file_mapping.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* memory.
*/

[generate_thunk]

label Chrome {
[channel=dev] M34 = 0.1
};
Expand Down
2 changes: 1 addition & 1 deletion ppapi/c/ppb_file_mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* found in the LICENSE file.
*/

/* From ppb_file_mapping.idl modified Mon Jan 27 11:00:43 2014. */
/* From ppb_file_mapping.idl modified Wed Jan 22 12:25:44 2014. */

#ifndef PPAPI_C_PPB_FILE_MAPPING_H_
#define PPAPI_C_PPB_FILE_MAPPING_H_
Expand Down
12 changes: 6 additions & 6 deletions ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,14 @@ static int32_t Pnacl_M34_PPB_FileMapping_Map(PP_Instance instance, PP_Resource f
return iface->Map(instance, file_io, length, map_protection, map_flags, offset, address, *callback);
}

static int32_t Pnacl_M34_PPB_FileMapping_Unmap(PP_Instance instance, const void* address, int64_t length, struct PP_CompletionCallback* callback) {
static int32_t Pnacl_M34_PPB_FileMapping_Unmap(PP_Instance file_io, const void* address, int64_t length, struct PP_CompletionCallback* callback) {
const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_1.real_iface;
return iface->Unmap(instance, address, length, *callback);
return iface->Unmap(file_io, address, length, *callback);
}

static int64_t Pnacl_M34_PPB_FileMapping_GetMapPageSize(PP_Instance instance) {
static int64_t Pnacl_M34_PPB_FileMapping_GetMapPageSize(PP_Instance file_io) {
const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_1.real_iface;
return iface->GetMapPageSize(instance);
return iface->GetMapPageSize(file_io);
}

/* End wrapper methods for PPB_FileMapping_0_1 */
Expand Down Expand Up @@ -4231,8 +4231,8 @@ static struct PPB_FileIO_1_1 Pnacl_Wrappers_PPB_FileIO_1_1 = {

static struct PPB_FileMapping_0_1 Pnacl_Wrappers_PPB_FileMapping_0_1 = {
.Map = (int32_t (*)(PP_Instance instance, PP_Resource file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void** address, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Map,
.Unmap = (int32_t (*)(PP_Instance instance, const void* address, int64_t length, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Unmap,
.GetMapPageSize = (int64_t (*)(PP_Instance instance))&Pnacl_M34_PPB_FileMapping_GetMapPageSize
.Unmap = (int32_t (*)(PP_Instance file_io, const void* address, int64_t length, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Unmap,
.GetMapPageSize = (int64_t (*)(PP_Instance file_io))&Pnacl_M34_PPB_FileMapping_GetMapPageSize
};

static struct PPB_FileRef_1_0 Pnacl_Wrappers_PPB_FileRef_1_0 = {
Expand Down
12 changes: 4 additions & 8 deletions ppapi/ppapi_proxy.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,8 @@
'proxy/extensions_common_resource.h',
'proxy/file_chooser_resource.cc',
'proxy/file_chooser_resource.h',
'proxy/file_io_resource.cc',
'proxy/file_io_resource.h',
'proxy/file_mapping_resource.cc',
'proxy/file_mapping_resource.h',
'proxy/file_mapping_resource_posix.cc',
'proxy/file_mapping_resource_win.cc',
'proxy/file_ref_resource.cc',
'proxy/file_ref_resource.h',
'proxy/file_system_resource.cc',
'proxy/file_system_resource.h',
'proxy/flash_clipboard_resource.cc',
'proxy/flash_clipboard_resource.h',
'proxy/flash_drm_resource.cc',
Expand All @@ -63,6 +55,10 @@
'proxy/flash_menu_resource.h',
'proxy/flash_resource.cc',
'proxy/flash_resource.h',
'proxy/file_io_resource.cc',
'proxy/file_io_resource.h',
'proxy/file_system_resource.cc',
'proxy/file_system_resource.h',
'proxy/gamepad_resource.cc',
'proxy/gamepad_resource.h',
'proxy/graphics_2d_resource.cc',
Expand Down
1 change: 0 additions & 1 deletion ppapi/ppapi_shared.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
'thunk/ppb_file_io_api.h',
'thunk/ppb_file_io_private_thunk.cc',
'thunk/ppb_file_io_thunk.cc',
'thunk/ppb_file_mapping_thunk.cc',
'thunk/ppb_file_ref_api.h',
'thunk/ppb_file_ref_thunk.cc',
'thunk/ppb_file_system_api.h',
Expand Down
3 changes: 0 additions & 3 deletions ppapi/ppapi_sources.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
'c/ppb_console.h',
'c/ppb_core.h',
'c/ppb_file_io.h',
'c/ppb_file_mapping.h',
'c/ppb_file_ref.h',
'c/ppb_file_system.h',
'c/ppb_fullscreen.h',
Expand Down Expand Up @@ -434,8 +433,6 @@
'tests/test_empty.h',
'tests/test_file_io.cc',
'tests/test_file_io.h',
'tests/test_file_mapping.cc',
'tests/test_file_mapping.h',
'tests/test_file_ref.cc',
'tests/test_file_ref.h',
'tests/test_file_system.cc',
Expand Down
5 changes: 1 addition & 4 deletions ppapi/proxy/file_io_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class PPAPI_PROXY_EXPORT FileIOResource
PP_FileHandle* handle,
scoped_refptr<TrackedCallback> callback) OVERRIDE;

private:
// FileHandleHolder is used to guarantee that file operations will have a
// valid FD to operate on, even if they're in a different thread.
// If instead we just passed the raw FD, the FD could be closed before the
Expand Down Expand Up @@ -101,11 +102,7 @@ class PPAPI_PROXY_EXPORT FileIOResource
~FileHandleHolder();
PP_FileHandle raw_handle_;
};
scoped_refptr<FileHandleHolder> file_handle() {
return file_handle_;
}

private:
// Class to perform file query operations across multiple threads.
class QueryOp : public base::RefCountedThreadSafe<QueryOp> {
public:
Expand Down
160 changes: 0 additions & 160 deletions ppapi/proxy/file_mapping_resource.cc

This file was deleted.

Loading

0 comments on commit dd565bb

Please sign in to comment.