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

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

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 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 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 "webcontentdecryptionmodule_impl.h" 5 #include "webcontentdecryptionmodule_impl.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 WebContentDecryptionModuleImpl::createSession() { 86 WebContentDecryptionModuleImpl::createSession() {
87 return adapter_->CreateSession(); 87 return adapter_->CreateSession();
88 } 88 }
89 89
90 void WebContentDecryptionModuleImpl::setServerCertificate( 90 void WebContentDecryptionModuleImpl::setServerCertificate(
91 const uint8* server_certificate, 91 const uint8* server_certificate,
92 size_t server_certificate_length, 92 size_t server_certificate_length,
93 blink::WebContentDecryptionModuleResult result) { 93 blink::WebContentDecryptionModuleResult result) {
94 DCHECK(server_certificate); 94 DCHECK(server_certificate);
95 adapter_->SetServerCertificate( 95 adapter_->SetServerCertificate(
96 server_certificate, 96 std::vector<uint8>(server_certificate,
97 base::saturated_cast<int>(server_certificate_length), 97 server_certificate + server_certificate_length),
98 scoped_ptr<SimpleCdmPromise>( 98 scoped_ptr<SimpleCdmPromise>(
99 new CdmResultPromise<>(result, std::string()))); 99 new CdmResultPromise<>(result, std::string())));
100 } 100 }
101 101
102 CdmContext* WebContentDecryptionModuleImpl::GetCdmContext() { 102 CdmContext* WebContentDecryptionModuleImpl::GetCdmContext() {
103 return adapter_->GetCdmContext(); 103 return adapter_->GetCdmContext();
104 } 104 }
105 105
106 } // namespace media 106 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/cdm_session_adapter.cc ('k') | media/blink/webcontentdecryptionmodulesession_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698