Bug 1338086 - Remove useless else blocks in order to reduce complexity in dom/media/gmp* r=cpearce

MozReview-Commit-ID: FaKW6Sb721i

--HG--
extra : rebase_source : f05a20bceeca69cb129067037e67f7bb57f5f450
This commit is contained in:
Sylvestre Ledru 2017-02-09 10:31:55 +01:00
Родитель c19020ed69
Коммит 0866d209a2
3 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -405,11 +405,13 @@ extern "C" {
if (!strcmp (aApiName, GMP_API_VIDEO_DECODER)) {
*aPluginApi = new FakeVideoDecoder (static_cast<GMPVideoHost*> (aHostAPI));
return GMPNoErr;
} else if (!strcmp (aApiName, GMP_API_VIDEO_ENCODER)) {
}
if (!strcmp (aApiName, GMP_API_VIDEO_ENCODER)) {
*aPluginApi = new FakeVideoEncoder (static_cast<GMPVideoHost*> (aHostAPI));
return GMPNoErr;
#if defined(GMP_FAKE_SUPPORT_DECRYPT)
} else if (!strcmp (aApiName, GMP_API_DECRYPTOR)) {
}
if (!strcmp (aApiName, GMP_API_DECRYPTOR)) {
*aPluginApi = new FakeDecryptor();
return GMPNoErr;
#endif

Просмотреть файл

@ -72,7 +72,8 @@ extern "C" {
// happens when decoder init fails.
return GMPGenericErr;
#if defined(GMP_FAKE_SUPPORT_DECRYPT)
} else if (!strcmp (aApiName, GMP_API_DECRYPTOR)) {
}
if (!strcmp (aApiName, GMP_API_DECRYPTOR)) {
*aPluginApi = new FakeDecryptor();
return GMPNoErr;
#endif

Просмотреть файл

@ -201,13 +201,11 @@ public:
{
if (mozilla::SandboxInfo::Get().CanSandboxMedia()) {
return MakeUnique<LinuxSandboxStarter>();
} else {
}
// Sandboxing isn't possible, but the parent has already
// checked that this plugin doesn't require it. (Bug 1074561)
return nullptr;
}
return nullptr;
}
bool Start(const char *aLibPath) override
{
mozilla::SetMediaPluginSandbox(aLibPath);