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

Side by Side Diff: third_party/WebKit/Source/modules/encryptedmedia/EncryptedMediaUtils.cpp

Issue 2001173002: encryptedmedia: Replace wtf/Assertions.h macros in favor of base/logging.h macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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 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 "modules/encryptedmedia/EncryptedMediaUtils.h" 5 #include "modules/encryptedmedia/EncryptedMediaUtils.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 23 matching lines...) Expand all
34 case WebEncryptedMediaInitDataType::Keyids: 34 case WebEncryptedMediaInitDataType::Keyids:
35 return "keyids"; 35 return "keyids";
36 case WebEncryptedMediaInitDataType::Webm: 36 case WebEncryptedMediaInitDataType::Webm:
37 return "webm"; 37 return "webm";
38 case WebEncryptedMediaInitDataType::Unknown: 38 case WebEncryptedMediaInitDataType::Unknown:
39 // Chromium should not use Unknown, but we use it in Blink when the 39 // Chromium should not use Unknown, but we use it in Blink when the
40 // actual value has been blocked for non-same-origin or mixed content. 40 // actual value has been blocked for non-same-origin or mixed content.
41 return String(); 41 return String();
42 } 42 }
43 43
44 ASSERT_NOT_REACHED(); 44 NOTREACHED();
45 return String(); 45 return String();
46 } 46 }
47 47
48 WebEncryptedMediaSessionType EncryptedMediaUtils::convertToSessionType(const Str ing& sessionType) 48 WebEncryptedMediaSessionType EncryptedMediaUtils::convertToSessionType(const Str ing& sessionType)
49 { 49 {
50 if (sessionType == kTemporary) 50 if (sessionType == kTemporary)
51 return WebEncryptedMediaSessionType::Temporary; 51 return WebEncryptedMediaSessionType::Temporary;
52 if (sessionType == kPersistentLicense) 52 if (sessionType == kPersistentLicense)
53 return WebEncryptedMediaSessionType::PersistentLicense; 53 return WebEncryptedMediaSessionType::PersistentLicense;
54 54
55 // |sessionType| is not restricted in the idl, so anything is possible. 55 // |sessionType| is not restricted in the idl, so anything is possible.
56 return WebEncryptedMediaSessionType::Unknown; 56 return WebEncryptedMediaSessionType::Unknown;
57 } 57 }
58 58
59 String EncryptedMediaUtils::convertFromSessionType(WebEncryptedMediaSessionType sessionType) 59 String EncryptedMediaUtils::convertFromSessionType(WebEncryptedMediaSessionType sessionType)
60 { 60 {
61 switch (sessionType) { 61 switch (sessionType) {
62 case WebEncryptedMediaSessionType::Temporary: 62 case WebEncryptedMediaSessionType::Temporary:
63 return kTemporary; 63 return kTemporary;
64 case WebEncryptedMediaSessionType::PersistentLicense: 64 case WebEncryptedMediaSessionType::PersistentLicense:
65 return kPersistentLicense; 65 return kPersistentLicense;
66 // FIXME: Remove once removed from Chromium (crbug.com/448888). 66 // FIXME: Remove once removed from Chromium (crbug.com/448888).
67 case WebEncryptedMediaSessionType::PersistentReleaseMessage: 67 case WebEncryptedMediaSessionType::PersistentReleaseMessage:
68 case WebEncryptedMediaSessionType::Unknown: 68 case WebEncryptedMediaSessionType::Unknown:
69 // Chromium should not use Unknown. 69 // Chromium should not use Unknown.
70 ASSERT_NOT_REACHED(); 70 NOTREACHED();
71 return String(); 71 return String();
72 } 72 }
73 73
74 ASSERT_NOT_REACHED(); 74 NOTREACHED();
75 return String(); 75 return String();
76 } 76 }
77 77
78 } // namespace blink 78 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698