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

Unified Diff: Source/modules/encryptedmedia/MediaKeys.cpp

Issue 641433002: Implement MediaKeySession.load() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes Created 6 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
Index: Source/modules/encryptedmedia/MediaKeys.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeys.cpp b/Source/modules/encryptedmedia/MediaKeys.cpp
index 462eef5c603456349d44dba35b48696ece90ca1c..14e6e6f907ace90f3c3808763950b45ac8abd4b8 100644
--- a/Source/modules/encryptedmedia/MediaKeys.cpp
+++ b/Source/modules/encryptedmedia/MediaKeys.cpp
@@ -46,16 +46,6 @@
#include "wtf/ArrayBufferView.h"
#include "wtf/RefPtr.h"
-#if ENABLE(ASSERT)
-namespace {
-
-// The list of possible values for |sessionType| passed to createSession().
-const char* kTemporary = "temporary";
-const char* kPersistent = "persistent";
-
-} // namespace
-#endif
-
namespace blink {
static bool isKeySystemSupportedWithContentType(const String& keySystem, const String& contentType)
@@ -201,7 +191,7 @@ MediaKeySession* MediaKeys::createSession(ScriptState* scriptState, const String
// corresponding to the keySystem, throw a DOMException whose name is
// "NotSupportedError".
// FIXME: Check whether sessionType is actually supported by the CDM.
- ASSERT(sessionType == kTemporary || sessionType == kPersistent);
+ ASSERT(MediaKeySession::isValidSessionType(sessionType));
// 2. Let session be a new MediaKeySession object, and initialize it as
// follows:

Powered by Google App Engine
This is Rietveld 408576698