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

Side by Side Diff: media/cdm/aes_decryptor.cc

Issue 2255943002: EME: Remove obsolete legacy APIs related to versions of prefixed EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build and add bug reference for obsoletes Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cdm/aes_decryptor.h" 5 #include "media/cdm/aes_decryptor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <list> 8 #include <list>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 default: 306 default:
307 NOTREACHED(); 307 NOTREACHED();
308 promise->reject(NOT_SUPPORTED_ERROR, 0, "init_data_type not supported."); 308 promise->reject(NOT_SUPPORTED_ERROR, 0, "init_data_type not supported.");
309 return; 309 return;
310 } 310 }
311 CreateLicenseRequest(keys, session_type, &message); 311 CreateLicenseRequest(keys, session_type, &message);
312 312
313 promise->resolve(session_id); 313 promise->resolve(session_id);
314 314
315 // No URL needed for license requests. 315 session_message_cb_.Run(session_id, LICENSE_REQUEST, message);
316 GURL empty_gurl;
317 session_message_cb_.Run(session_id, LICENSE_REQUEST, message, empty_gurl);
318 } 316 }
319 317
320 void AesDecryptor::LoadSession(SessionType session_type, 318 void AesDecryptor::LoadSession(SessionType session_type,
321 const std::string& session_id, 319 const std::string& session_id,
322 std::unique_ptr<NewSessionCdmPromise> promise) { 320 std::unique_ptr<NewSessionCdmPromise> promise) {
323 // TODO(xhwang): Change this to NOTREACHED() when blink checks for key systems 321 // TODO(xhwang): Change this to NOTREACHED() when blink checks for key systems
324 // that do not support loadSession. See http://crbug.com/342481 322 // that do not support loadSession. See http://crbug.com/342481
325 promise->reject(NOT_SUPPORTED_ERROR, 0, "LoadSession() is not supported."); 323 promise->reject(NOT_SUPPORTED_ERROR, 0, "LoadSession() is not supported.");
326 } 324 }
327 325
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 bool AesDecryptor::DecryptionKey::Init() { 599 bool AesDecryptor::DecryptionKey::Init() {
602 CHECK(!secret_.empty()); 600 CHECK(!secret_.empty());
603 decryption_key_ = 601 decryption_key_ =
604 crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, secret_); 602 crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, secret_);
605 if (!decryption_key_) 603 if (!decryption_key_)
606 return false; 604 return false;
607 return true; 605 return true;
608 } 606 }
609 607
610 } // namespace media 608 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698