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

Side by Side Diff: media/base/android/android_cdm_factory.cc

Issue 2568463003: media: Rename MediaKeys to ContentDecryptionModule (Closed)
Patch Set: Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/base/android/android_cdm_factory.h" 5 #include "media/base/android/android_cdm_factory.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "media/base/android/media_drm_bridge.h" 9 #include "media/base/android/media_drm_bridge.h"
10 #include "media/base/bind_to_current_loop.h" 10 #include "media/base/bind_to_current_loop.h"
(...skipping 26 matching lines...) Expand all
37 37
38 if (!security_origin.is_valid()) { 38 if (!security_origin.is_valid()) {
39 bound_cdm_created_cb.Run(nullptr, "Invalid origin."); 39 bound_cdm_created_cb.Run(nullptr, "Invalid origin.");
40 return; 40 return;
41 } 41 }
42 42
43 // Create AesDecryptor here to support External Clear Key key system. 43 // Create AesDecryptor here to support External Clear Key key system.
44 // This is used for testing. 44 // This is used for testing.
45 if (base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting) && 45 if (base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting) &&
46 IsExternalClearKey(key_system)) { 46 IsExternalClearKey(key_system)) {
47 scoped_refptr<MediaKeys> cdm( 47 scoped_refptr<ContentDecryptionModule> cdm(
jrummell 2016/12/12 22:08:39 nit: Should include content_decryption_module.h si
xhwang 2016/12/12 22:32:50 Done.
48 new AesDecryptor(security_origin, session_message_cb, session_closed_cb, 48 new AesDecryptor(security_origin, session_message_cb, session_closed_cb,
49 session_keys_change_cb)); 49 session_keys_change_cb));
50 bound_cdm_created_cb.Run(cdm, ""); 50 bound_cdm_created_cb.Run(cdm, "");
51 return; 51 return;
52 } 52 }
53 53
54 std::string error_message; 54 std::string error_message;
55 55
56 if (!MediaDrmBridge::IsKeySystemSupported(key_system)) { 56 if (!MediaDrmBridge::IsKeySystemSupported(key_system)) {
57 error_message = "Key system not supported unexpectedly: " + key_system; 57 error_message = "Key system not supported unexpectedly: " + key_system;
(...skipping 28 matching lines...) Expand all
86 LOG(ERROR) << error_message; 86 LOG(ERROR) << error_message;
87 bound_cdm_created_cb.Run(nullptr, error_message); 87 bound_cdm_created_cb.Run(nullptr, error_message);
88 return; 88 return;
89 } 89 }
90 90
91 // Success! 91 // Success!
92 bound_cdm_created_cb.Run(cdm, ""); 92 bound_cdm_created_cb.Run(cdm, "");
93 } 93 }
94 94
95 } // namespace media 95 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698