From 7e78f753dadf5317877124958136ab9212862b06 Mon Sep 17 00:00:00 2001 From: "raymes@chromium.org" Date: Fri, 7 Dec 2012 22:12:01 +0000 Subject: Remove PPB_Flash_File_ModuleLocal_2_0. PPB_Flash_File_ModuleLocal_2_0 was replaced in Flash by version 3_0 in M21 and can be removed. BUG= Review URL: https://codereview.chromium.org/11472036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171858 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/cpp/private/flash_file.cc | 66 +---------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) (limited to 'ppapi/cpp') diff --git a/ppapi/cpp/private/flash_file.cc b/ppapi/cpp/private/flash_file.cc index 2aea2c3..7004b98 100644 --- a/ppapi/cpp/private/flash_file.cc +++ b/ppapi/cpp/private/flash_file.cc @@ -20,10 +20,6 @@ template <> const char* interface_name() { return PPB_FLASH_FILE_MODULELOCAL_INTERFACE_3_0; } -template <> const char* interface_name() { - return PPB_FLASH_FILE_MODULELOCAL_INTERFACE_2_0; -} - } // namespace namespace flash { @@ -35,34 +31,7 @@ static FileModuleLocal::DirEntry ConvertDirEntry(const PP_DirEntry_Dev& entry) { // static bool FileModuleLocal::IsAvailable() { - return has_interface() || - has_interface(); -} - -// static -bool FileModuleLocal::CreateThreadAdapterForInstance( - const InstanceHandle& instance) { - bool rv = false; - if (has_interface()) { - rv = get_interface()-> - CreateThreadAdapterForInstance(instance.pp_instance()); - } else if (has_interface()) { - rv = get_interface()-> - CreateThreadAdapterForInstance( instance.pp_instance()); - } - return rv; -} - -// static -void FileModuleLocal::ClearThreadAdapterForInstance( - const InstanceHandle& instance) { - if (has_interface()) { - get_interface()-> - ClearThreadAdapterForInstance(instance.pp_instance()); - } else if (has_interface()) { - get_interface()-> - ClearThreadAdapterForInstance(instance.pp_instance()); - } + return has_interface(); } // static @@ -74,9 +43,6 @@ PP_FileHandle FileModuleLocal::OpenFile(const InstanceHandle& instance, if (has_interface()) { result = get_interface()-> OpenFile(instance.pp_instance(), path.c_str(), mode, &file_handle); - } else if (has_interface()) { - result = get_interface()-> - OpenFile(instance.pp_instance(), path.c_str(), mode, &file_handle); } return (result == PP_OK) ? file_handle : PP_kInvalidFileHandle; } @@ -89,9 +55,6 @@ bool FileModuleLocal::RenameFile(const InstanceHandle& instance, if (has_interface()) { result = get_interface()-> RenameFile(instance.pp_instance(), path_from.c_str(), path_to.c_str()); - } else if (has_interface()) { - result = get_interface()-> - RenameFile(instance.pp_instance(), path_from.c_str(), path_to.c_str()); } return result == PP_OK; } @@ -105,10 +68,6 @@ bool FileModuleLocal::DeleteFileOrDir(const InstanceHandle& instance, result = get_interface()-> DeleteFileOrDir(instance.pp_instance(), path.c_str(), PP_FromBool(recursive)); - } else if (has_interface()) { - result = get_interface()-> - DeleteFileOrDir(instance.pp_instance(), path.c_str(), - PP_FromBool(recursive)); } return result == PP_OK; } @@ -120,9 +79,6 @@ bool FileModuleLocal::CreateDir(const InstanceHandle& instance, if (has_interface()) { result = get_interface()-> CreateDir(instance.pp_instance(), path.c_str()); - } else if (has_interface()) { - result = get_interface()-> - CreateDir(instance.pp_instance(), path.c_str()); } return result == PP_OK; } @@ -135,9 +91,6 @@ bool FileModuleLocal::QueryFile(const InstanceHandle& instance, if (has_interface()) { result = get_interface()-> QueryFile(instance.pp_instance(), path.c_str(), info); - } else if (has_interface()) { - result = get_interface()-> - QueryFile(instance.pp_instance(), path.c_str(), info); } return result == PP_OK; } @@ -162,28 +115,11 @@ bool FileModuleLocal::GetDirContents( get_interface()-> FreeDirContents(instance.pp_instance(), contents); } - } else if (has_interface()) { - PP_DirContents_Dev* contents = NULL; - result = get_interface()-> - GetDirContents(instance.pp_instance(), path.c_str(), &contents); - if (result == PP_OK && contents) { - for (int32_t i = 0; i < contents->count; i++) - dir_contents->push_back(ConvertDirEntry(contents->entries[i])); - } - if (contents) { - get_interface()-> - FreeDirContents(instance.pp_instance(), contents); - } } return result == PP_OK; } // static -bool FileModuleLocal::IsCreateTemporaryFileAvailable() { - return has_interface(); -} - -// static PP_FileHandle FileModuleLocal::CreateTemporaryFile( const InstanceHandle& instance) { PP_FileHandle file_handle = PP_kInvalidFileHandle; -- cgit v1.1