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

Side by Side Diff: trunk/src/content/renderer/media/webcontentdecryptionmodule_impl.cc

Issue 198163004: Revert 257524 "Move IsStringASCII/UTF8 to base namespace." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 "content/renderer/media/webcontentdecryptionmodule_impl.h" 5 #include "content/renderer/media/webcontentdecryptionmodule_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "content/renderer/media/cdm_session_adapter.h" 15 #include "content/renderer/media/cdm_session_adapter.h"
16 #include "content/renderer/media/webcontentdecryptionmodulesession_impl.h" 16 #include "content/renderer/media/webcontentdecryptionmodulesession_impl.h"
17 #include "media/base/media_keys.h" 17 #include "media/base/media_keys.h"
18 18
19 #if defined(ENABLE_PEPPER_CDMS) 19 #if defined(ENABLE_PEPPER_CDMS)
20 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h" 20 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h"
21 #endif 21 #endif
22 22
23 namespace content { 23 namespace content {
24 24
25 WebContentDecryptionModuleImpl* WebContentDecryptionModuleImpl::Create( 25 WebContentDecryptionModuleImpl* WebContentDecryptionModuleImpl::Create(
26 const base::string16& key_system) { 26 const base::string16& key_system) {
27 // TODO(ddorwin): Guard against this in supported types check and remove this. 27 // TODO(ddorwin): Guard against this in supported types check and remove this.
28 // Chromium only supports ASCII key systems. 28 // Chromium only supports ASCII key systems.
29 if (!base::IsStringASCII(key_system)) { 29 if (!IsStringASCII(key_system)) {
30 NOTREACHED(); 30 NOTREACHED();
31 return NULL; 31 return NULL;
32 } 32 }
33 33
34 scoped_refptr<CdmSessionAdapter> adapter(new CdmSessionAdapter()); 34 scoped_refptr<CdmSessionAdapter> adapter(new CdmSessionAdapter());
35 if (!adapter->Initialize( 35 if (!adapter->Initialize(
36 #if defined(ENABLE_PEPPER_CDMS) 36 #if defined(ENABLE_PEPPER_CDMS)
37 // TODO(jrummell): Figure out how to get a WebFrame from Blink (or 37 // TODO(jrummell): Figure out how to get a WebFrame from Blink (or
38 // something equivalent) so the plugin can actually get created. 38 // something equivalent) so the plugin can actually get created.
39 // http://crbug.com/250049 39 // http://crbug.com/250049
(...skipping 20 matching lines...) Expand all
60 WebContentDecryptionModuleImpl::createSession( 60 WebContentDecryptionModuleImpl::createSession(
61 blink::WebContentDecryptionModuleSession::Client* client) { 61 blink::WebContentDecryptionModuleSession::Client* client) {
62 return adapter_->CreateSession(client); 62 return adapter_->CreateSession(client);
63 } 63 }
64 64
65 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() { 65 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() {
66 return adapter_->GetDecryptor(); 66 return adapter_->GetDecryptor();
67 } 67 }
68 68
69 } // namespace content 69 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698