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

Unified Diff: media/cdm/ppapi/cdm_adapter.cc

Issue 1050823009: Handle all possible cdm::Status values before passing through Pepper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes Created 5 years, 8 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/ppapi/cdm_adapter.cc
diff --git a/media/cdm/ppapi/cdm_adapter.cc b/media/cdm/ppapi/cdm_adapter.cc
index 1d765d07d95bef207b5c0a14aa8b7082794aff1c..636ea3284be2ae2bdcf0bb28a9904940aa1fbb09 100644
--- a/media/cdm/ppapi/cdm_adapter.cc
+++ b/media/cdm/ppapi/cdm_adapter.cc
@@ -105,10 +105,16 @@ PP_DecryptResult CdmStatusToPpDecryptResult(cdm::Status status) {
return PP_DECRYPTRESULT_DECRYPT_ERROR;
case cdm::kDecodeError:
return PP_DECRYPTRESULT_DECODE_ERROR;
- default:
- PP_NOTREACHED();
- return PP_DECRYPTRESULT_DECODE_ERROR;
+ case cdm::kSessionError:
+ case cdm::kDeferredInitialization:
+ // kSessionError and kDeferredInitialization are only used by the
+ // Initialize* methods internally and never returned. Deliver*
+ // methods should never use these values.
+ break;
}
+
+ PP_NOTREACHED();
+ return PP_DECRYPTRESULT_DECRYPT_ERROR;
}
PP_DecryptedFrameFormat CdmVideoFormatToPpDecryptedFrameFormat(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698