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

Side by Side Diff: media/blink/webencryptedmediaclient_impl.cc

Issue 985113003: Block platform verification and file IO in the CDM adapter if the CDM configuration disallows them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DCHECK types. Created 5 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
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.h ('k') | media/cdm/default_cdm_factory.h » ('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 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 "webencryptedmediaclient_impl.h" 5 #include "webencryptedmediaclient_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 } 488 }
489 489
490 // 7.4. Reject promise with a new DOMException whose name is 490 // 7.4. Reject promise with a new DOMException whose name is
491 // NotSupportedError. 491 // NotSupportedError.
492 request.requestNotSupported( 492 request.requestNotSupported(
493 "None of the requested configurations were supported."); 493 "None of the requested configurations were supported.");
494 } 494 }
495 495
496 void WebEncryptedMediaClientImpl::CreateCdm( 496 void WebEncryptedMediaClientImpl::CreateCdm(
497 const blink::WebString& key_system, 497 const blink::WebString& key_system,
498 bool allow_distinctive_identifier,
499 bool allow_persistent_state,
498 const blink::WebSecurityOrigin& security_origin, 500 const blink::WebSecurityOrigin& security_origin,
499 blink::WebContentDecryptionModuleResult result) { 501 blink::WebContentDecryptionModuleResult result) {
500 WebContentDecryptionModuleImpl::Create(cdm_factory_.get(), security_origin, 502 WebContentDecryptionModuleImpl::Create(cdm_factory_.get(), key_system,
501 key_system, result); 503 allow_distinctive_identifier,
504 allow_persistent_state,
505 security_origin, result);
502 } 506 }
503 507
504 // Lazily create Reporters. 508 // Lazily create Reporters.
505 WebEncryptedMediaClientImpl::Reporter* WebEncryptedMediaClientImpl::GetReporter( 509 WebEncryptedMediaClientImpl::Reporter* WebEncryptedMediaClientImpl::GetReporter(
506 const std::string& key_system) { 510 const std::string& key_system) {
507 std::string uma_name = GetKeySystemNameForUMA(key_system); 511 std::string uma_name = GetKeySystemNameForUMA(key_system);
508 Reporter* reporter = reporters_.get(uma_name); 512 Reporter* reporter = reporters_.get(uma_name);
509 if (reporter != nullptr) 513 if (reporter != nullptr)
510 return reporter; 514 return reporter;
511 515
512 // Reporter not found, so create one. 516 // Reporter not found, so create one.
513 auto result = 517 auto result =
514 reporters_.add(uma_name, make_scoped_ptr(new Reporter(uma_name))); 518 reporters_.add(uma_name, make_scoped_ptr(new Reporter(uma_name)));
515 DCHECK(result.second); 519 DCHECK(result.second);
516 return result.first->second; 520 return result.first->second;
517 } 521 }
518 522
519 } // namespace media 523 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.h ('k') | media/cdm/default_cdm_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698