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

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 2831963003: EME: Allow temporary sessions to be removed for ClearKey only. (Closed)
Patch Set: rebase Created 3 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 | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
index 02128d9c900173584204fb5ef5453db69c960db1..7036d51910f88ae8e91d07aa26ef0a1fbba05537 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -813,37 +813,27 @@ ScriptPromise MediaKeySession::remove(ScriptState* script_state) {
if (!is_callable_)
return CreateRejectedPromiseNotCallable(script_state);
- // 3. If the result of running the "Is persistent session type?" algorithm
- // on this object's session type is false, return a promise rejected
- // with a newly created TypeError.
- if (!IsPersistentSessionType(session_type_)) {
- return ScriptPromise::Reject(
- script_state,
- V8ThrowException::CreateTypeError(
- script_state->GetIsolate(), "The session type is not persistent."));
- }
-
- // 4. Let promise be a new promise.
+ // 3. Let promise be a new promise.
SimpleResultPromise* result = new SimpleResultPromise(script_state, this);
ScriptPromise promise = result->Promise();
- // 5. Run the following steps asynchronously (done in removeTask()).
+ // 4. Run the following steps asynchronously (done in removeTask()).
pending_actions_.push_back(PendingAction::CreatePendingRemove(result));
if (!action_timer_.IsActive())
action_timer_.StartOneShot(0, BLINK_FROM_HERE);
- // 6. Return promise.
+ // 5. Return promise.
return promise;
}
void MediaKeySession::RemoveTask(ContentDecryptionModuleResult* result) {
- // NOTE: Continue step 5 of MediaKeySession::remove().
+ // NOTE: Continue step 4 of MediaKeySession::remove().
DVLOG(MEDIA_KEY_SESSION_LOG_LEVEL) << __func__ << "(" << this << ")";
- // remove() in Chromium will execute steps 5.1 through 5.3.
+ // remove() in Chromium will execute steps 4.1 through 4.5.
session_->Remove(result->Result());
- // Last step (5.3.6 Resolve promise) will be done when |result| is resolved.
+ // Last step (4.5.6 Resolve promise) will be done when |result| is resolved.
}
void MediaKeySession::ActionTimerFired(TimerBase*) {
« no previous file with comments | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698