| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/chromeos/attestation/platform_verification_impl.h" | 5 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 namespace attestation { | 15 namespace attestation { |
| 16 | 16 |
| 17 using media::mojom::PlatformVerification; | 17 using media::mojom::PlatformVerification; |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 void PlatformVerificationImpl::Create( | 20 void PlatformVerificationImpl::Create( |
| 21 content::RenderFrameHost* render_frame_host, | 21 content::RenderFrameHost* render_frame_host, |
| 22 mojo::InterfaceRequest<PlatformVerification> request) { | 22 const service_manager::BindSourceInfo& source_info, |
| 23 media::mojom::PlatformVerificationRequest request) { |
| 23 DVLOG(2) << __FUNCTION__; | 24 DVLOG(2) << __FUNCTION__; |
| 24 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 25 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 25 DCHECK(render_frame_host); | 26 DCHECK(render_frame_host); |
| 26 mojo::MakeStrongBinding( | 27 mojo::MakeStrongBinding( |
| 27 base::MakeUnique<PlatformVerificationImpl>(render_frame_host), | 28 base::MakeUnique<PlatformVerificationImpl>(render_frame_host), |
| 28 std::move(request)); | 29 std::move(request)); |
| 29 } | 30 } |
| 30 | 31 |
| 31 PlatformVerificationImpl::PlatformVerificationImpl( | 32 PlatformVerificationImpl::PlatformVerificationImpl( |
| 32 content::RenderFrameHost* render_frame_host) | 33 content::RenderFrameHost* render_frame_host) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 73 } |
| 73 | 74 |
| 74 DCHECK(!signed_data.empty()); | 75 DCHECK(!signed_data.empty()); |
| 75 DCHECK(!signature.empty()); | 76 DCHECK(!signature.empty()); |
| 76 DCHECK(!platform_key_certificate.empty()); | 77 DCHECK(!platform_key_certificate.empty()); |
| 77 callback.Run(true, signed_data, signature, platform_key_certificate); | 78 callback.Run(true, signed_data, signature, platform_key_certificate); |
| 78 } | 79 } |
| 79 | 80 |
| 80 } // namespace attestation | 81 } // namespace attestation |
| 81 } // namespace chromeos | 82 } // namespace chromeos |
| OLD | NEW |