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

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: don't pass through Pepper 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..2942fe2168745f434d141f17764273980d1bcd7f 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. DecodeAndDecrypt*
ddorwin 2015/04/27 22:43:24 Deliver* should never use....
jrummell 2015/04/27 23:02:25 Done.
+ // methods should never return these values.
+ break;
}
+
+ PP_NOTREACHED();
+ return PP_DECRYPTRESULT_DECODE_ERROR;
ddorwin 2015/04/27 22:43:24 DECRYPT? This call can result from just Decrypt()
jrummell 2015/04/27 23:02:25 This is what was in the original, and content_decr
}
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