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

Side by Side Diff: chromecast/media/base/key_systems_common.cc

Issue 605923002: Chromecast: guard PlayReady with C-define to prevent accidental use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « chromecast/media/base/key_systems_common.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/media/base/key_systems_common.h" 5 #include "chromecast/media/base/key_systems_common.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "media/cdm/key_system_names.h" 9 #include "media/cdm/key_system_names.h"
10 10
11 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 11 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
12 12
13 namespace chromecast { 13 namespace chromecast {
14 namespace media { 14 namespace media {
15 15
16 #if defined(PLAYREADY_CDM_AVAILABLE)
16 const char kChromecastPlayreadyKeySystem[] = "com.chromecast.playready"; 17 const char kChromecastPlayreadyKeySystem[] = "com.chromecast.playready";
18 #endif // defined(PLAYREADY_CDM_AVAILABLE)
17 19
18 CastKeySystem GetKeySystemByName(const std::string& key_system_name) { 20 CastKeySystem GetKeySystemByName(const std::string& key_system_name) {
19 #if defined(WIDEVINE_CDM_AVAILABLE) 21 #if defined(WIDEVINE_CDM_AVAILABLE)
20 if (key_system_name.compare(kWidevineKeySystem) == 0) { 22 if (key_system_name.compare(kWidevineKeySystem) == 0) {
21 return KEY_SYSTEM_WIDEVINE; 23 return KEY_SYSTEM_WIDEVINE;
22 } 24 }
23 #endif // defined(WIDEVINE_CDM_AVAILABLE) 25 #endif // defined(WIDEVINE_CDM_AVAILABLE)
24 26
25 #if defined(PLAYREADY_CDM_AVAILABLE) 27 #if defined(PLAYREADY_CDM_AVAILABLE)
26 if (key_system_name.compare(kChromecastPlayreadyKeySystem) == 0) { 28 if (key_system_name.compare(kChromecastPlayreadyKeySystem) == 0) {
27 return KEY_SYSTEM_PLAYREADY; 29 return KEY_SYSTEM_PLAYREADY;
28 } 30 }
29 #endif // defined(PLAYREADY_CDM_AVAILABLE) 31 #endif // defined(PLAYREADY_CDM_AVAILABLE)
30 32
31 if (key_system_name.compare(::media::kClearKey) == 0) { 33 if (key_system_name.compare(::media::kClearKey) == 0) {
32 return KEY_SYSTEM_CLEAR_KEY; 34 return KEY_SYSTEM_CLEAR_KEY;
33 } 35 }
34 36
35 return GetPlatformKeySystemByName(key_system_name); 37 return GetPlatformKeySystemByName(key_system_name);
36 } 38 }
37 39
38 } // namespace media 40 } // namespace media
39 } // namespace chromecast 41 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/base/key_systems_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698