summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 22:12:01 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 22:12:01 +0000
commit7e78f753dadf5317877124958136ab9212862b06 (patch)
tree0864ca51702864140685b4829feea7678775fe58 /ppapi/cpp
parentc457431a8c52a9e40d8686f1e4b0c4501b90ae1a (diff)
downloadchromium_src-7e78f753dadf5317877124958136ab9212862b06.zip
chromium_src-7e78f753dadf5317877124958136ab9212862b06.tar.gz
chromium_src-7e78f753dadf5317877124958136ab9212862b06.tar.bz2
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
Diffstat (limited to 'ppapi/cpp')
-rw-r--r--ppapi/cpp/private/flash_file.cc66
1 files changed, 1 insertions, 65 deletions
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<PPB_Flash_File_ModuleLocal_3_0>() {
return PPB_FLASH_FILE_MODULELOCAL_INTERFACE_3_0;
}
-template <> const char* interface_name<PPB_Flash_File_ModuleLocal_2_0>() {
- 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<PPB_Flash_File_ModuleLocal_3_0>() ||
- has_interface<PPB_Flash_File_ModuleLocal_2_0>();
-}
-
-// static
-bool FileModuleLocal::CreateThreadAdapterForInstance(
- const InstanceHandle& instance) {
- bool rv = false;
- if (has_interface<PPB_Flash_File_ModuleLocal_3_0>()) {
- rv = get_interface<PPB_Flash_File_ModuleLocal_3_0>()->
- CreateThreadAdapterForInstance(instance.pp_instance());
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- rv = get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- CreateThreadAdapterForInstance( instance.pp_instance());
- }
- return rv;
-}
-
-// static
-void FileModuleLocal::ClearThreadAdapterForInstance(
- const InstanceHandle& instance) {
- if (has_interface<PPB_Flash_File_ModuleLocal_3_0>()) {
- get_interface<PPB_Flash_File_ModuleLocal_3_0>()->
- ClearThreadAdapterForInstance(instance.pp_instance());
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- ClearThreadAdapterForInstance(instance.pp_instance());
- }
+ return has_interface<PPB_Flash_File_ModuleLocal_3_0>();
}
// static
@@ -74,9 +43,6 @@ PP_FileHandle FileModuleLocal::OpenFile(const InstanceHandle& instance,
if (has_interface<PPB_Flash_File_ModuleLocal_3_0>()) {
result = get_interface<PPB_Flash_File_ModuleLocal_3_0>()->
OpenFile(instance.pp_instance(), path.c_str(), mode, &file_handle);
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- result = get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- 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<PPB_Flash_File_ModuleLocal_3_0>()) {
result = get_interface<PPB_Flash_File_ModuleLocal_3_0>()->
RenameFile(instance.pp_instance(), path_from.c_str(), path_to.c_str());
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- result = get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- 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<PPB_Flash_File_ModuleLocal_3_0>()->
DeleteFileOrDir(instance.pp_instance(), path.c_str(),
PP_FromBool(recursive));
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- result = get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- 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<PPB_Flash_File_ModuleLocal_3_0>()) {
result = get_interface<PPB_Flash_File_ModuleLocal_3_0>()->
CreateDir(instance.pp_instance(), path.c_str());
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- result = get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- CreateDir(instance.pp_instance(), path.c_str());
}
return result == PP_OK;
}
@@ -135,9 +91,6 @@ bool FileModuleLocal::QueryFile(const InstanceHandle& instance,
if (has_interface<PPB_Flash_File_ModuleLocal_3_0>()) {
result = get_interface<PPB_Flash_File_ModuleLocal_3_0>()->
QueryFile(instance.pp_instance(), path.c_str(), info);
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- result = get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- QueryFile(instance.pp_instance(), path.c_str(), info);
}
return result == PP_OK;
}
@@ -162,28 +115,11 @@ bool FileModuleLocal::GetDirContents(
get_interface<PPB_Flash_File_ModuleLocal_3_0>()->
FreeDirContents(instance.pp_instance(), contents);
}
- } else if (has_interface<PPB_Flash_File_ModuleLocal_2_0>()) {
- PP_DirContents_Dev* contents = NULL;
- result = get_interface<PPB_Flash_File_ModuleLocal_2_0>()->
- 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<PPB_Flash_File_ModuleLocal_2_0>()->
- FreeDirContents(instance.pp_instance(), contents);
- }
}
return result == PP_OK;
}
// static
-bool FileModuleLocal::IsCreateTemporaryFileAvailable() {
- return has_interface<PPB_Flash_File_ModuleLocal_3_0>();
-}
-
-// static
PP_FileHandle FileModuleLocal::CreateTemporaryFile(
const InstanceHandle& instance) {
PP_FileHandle file_handle = PP_kInvalidFileHandle;