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

Unified Diff: media/base/cdm_promise.h

Issue 2444683002: Move MediaKeys::Exception to CdmPromise::Exception (Closed)
Patch Set: include "media/base/media_keys.h" Created 4 years, 2 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 | « media/base/cdm_initialized_promise.cc ('k') | media/base/cdm_promise_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/cdm_promise.h
diff --git a/media/base/cdm_promise.h b/media/base/cdm_promise.h
index dc11e7a01442b4be675375a2132937e724cbb526..ed61058e6d1703113c7a9d98b18a933a8a1d1344 100644
--- a/media/base/cdm_promise.h
+++ b/media/base/cdm_promise.h
@@ -32,6 +32,19 @@ namespace media {
// the pepper interface.
class MEDIA_EXPORT CdmPromise {
public:
+ // TODO(jrummell): Remove deprecated errors. See
+ // http://crbug.com/570216
+ enum Exception {
+ NOT_SUPPORTED_ERROR,
+ INVALID_STATE_ERROR,
+ INVALID_ACCESS_ERROR,
+ QUOTA_EXCEEDED_ERROR,
+ UNKNOWN_ERROR,
+ CLIENT_ERROR,
+ OUTPUT_ERROR,
+ EXCEPTION_MAX = OUTPUT_ERROR
+ };
+
enum ResolveParameterType {
VOID_TYPE,
INT_TYPE,
@@ -46,7 +59,7 @@ class MEDIA_EXPORT CdmPromise {
// specified. |system_code| is a Key System-specific value for the error
// that occurred, or 0 if there is no associated status code or such status
// codes are not supported by the Key System. |error_message| is optional.
- virtual void reject(MediaKeys::Exception exception_code,
+ virtual void reject(Exception exception_code,
uint32_t system_code,
const std::string& error_message) = 0;
@@ -90,7 +103,7 @@ class MEDIA_EXPORT CdmPromiseTemplate : public CdmPromise {
virtual void resolve(const T&... result) = 0;
// CdmPromise implementation.
- virtual void reject(MediaKeys::Exception exception_code,
+ virtual void reject(Exception exception_code,
uint32_t system_code,
const std::string& error_message) = 0;
@@ -116,7 +129,7 @@ class MEDIA_EXPORT CdmPromiseTemplate : public CdmPromise {
std::string message =
"Unfulfilled promise rejected automatically during destruction.";
DVLOG(1) << message;
- reject(MediaKeys::INVALID_STATE_ERROR, 0, message);
+ reject(INVALID_STATE_ERROR, 0, message);
DCHECK(is_settled_);
}
« no previous file with comments | « media/base/cdm_initialized_promise.cc ('k') | media/base/cdm_promise_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698