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

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

Issue 1447943002: Revert of Add unit tests for CdmAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « media/BUILD.gn ('k') | media/cdm/cdm_adapter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <list> 7 #include <list>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 promise->reject(NOT_SUPPORTED_ERROR, 0, 302 promise->reject(NOT_SUPPORTED_ERROR, 0,
303 "init_data_type not supported."); 303 "init_data_type not supported.");
304 return; 304 return;
305 } 305 }
306 CreateLicenseRequest(keys, session_type, &message); 306 CreateLicenseRequest(keys, session_type, &message);
307 } 307 }
308 308
309 promise->resolve(session_id); 309 promise->resolve(session_id);
310 310
311 // No URL needed for license requests. 311 // No URL needed for license requests.
312 GURL empty_gurl; 312 session_message_cb_.Run(session_id, LICENSE_REQUEST, message,
313 session_message_cb_.Run(session_id, LICENSE_REQUEST, message, empty_gurl); 313 GURL::EmptyGURL());
314 } 314 }
315 315
316 void AesDecryptor::LoadSession(SessionType session_type, 316 void AesDecryptor::LoadSession(SessionType session_type,
317 const std::string& session_id, 317 const std::string& session_id,
318 scoped_ptr<NewSessionCdmPromise> promise) { 318 scoped_ptr<NewSessionCdmPromise> promise) {
319 // TODO(xhwang): Change this to NOTREACHED() when blink checks for key systems 319 // TODO(xhwang): Change this to NOTREACHED() when blink checks for key systems
320 // that do not support loadSession. See http://crbug.com/342481 320 // that do not support loadSession. See http://crbug.com/342481
321 promise->reject(NOT_SUPPORTED_ERROR, 0, "LoadSession() is not supported."); 321 promise->reject(NOT_SUPPORTED_ERROR, 0, "LoadSession() is not supported.");
322 } 322 }
323 323
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 bool AesDecryptor::DecryptionKey::Init() { 604 bool AesDecryptor::DecryptionKey::Init() {
605 CHECK(!secret_.empty()); 605 CHECK(!secret_.empty());
606 decryption_key_.reset(crypto::SymmetricKey::Import( 606 decryption_key_.reset(crypto::SymmetricKey::Import(
607 crypto::SymmetricKey::AES, secret_)); 607 crypto::SymmetricKey::AES, secret_));
608 if (!decryption_key_) 608 if (!decryption_key_)
609 return false; 609 return false;
610 return true; 610 return true;
611 } 611 }
612 612
613 } // namespace media 613 } // namespace media
OLDNEW
« no previous file with comments | « media/BUILD.gn ('k') | media/cdm/cdm_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698