| 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 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public: | 23 public: |
| 24 static void Create( | 24 static void Create( |
| 25 content::RenderFrameHost* render_frame_host, | 25 content::RenderFrameHost* render_frame_host, |
| 26 mojo::InterfaceRequest<media::mojom::PlatformVerification> request); | 26 mojo::InterfaceRequest<media::mojom::PlatformVerification> request); |
| 27 | 27 |
| 28 explicit PlatformVerificationImpl( | 28 explicit PlatformVerificationImpl( |
| 29 content::RenderFrameHost* render_frame_host); | 29 content::RenderFrameHost* render_frame_host); |
| 30 ~PlatformVerificationImpl() override; | 30 ~PlatformVerificationImpl() override; |
| 31 | 31 |
| 32 // mojo::InterfaceImpl<PlatformVerification> implementation. | 32 // mojo::InterfaceImpl<PlatformVerification> implementation. |
| 33 void ChallengePlatform(const mojo::String& service_id, | 33 void ChallengePlatform(const std::string& service_id, |
| 34 const mojo::String& challenge, | 34 const std::string& challenge, |
| 35 const ChallengePlatformCallback& callback) override; | 35 const ChallengePlatformCallback& callback) override; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 using Result = PlatformVerificationFlow::Result; | 38 using Result = PlatformVerificationFlow::Result; |
| 39 | 39 |
| 40 void OnPlatformChallenged(const ChallengePlatformCallback& callback, | 40 void OnPlatformChallenged(const ChallengePlatformCallback& callback, |
| 41 Result result, | 41 Result result, |
| 42 const std::string& signed_data, | 42 const std::string& signed_data, |
| 43 const std::string& signature, | 43 const std::string& signature, |
| 44 const std::string& platform_key_certificate); | 44 const std::string& platform_key_certificate); |
| 45 | 45 |
| 46 content::RenderFrameHost* const render_frame_host_; | 46 content::RenderFrameHost* const render_frame_host_; |
| 47 | 47 |
| 48 scoped_refptr<PlatformVerificationFlow> platform_verification_flow_; | 48 scoped_refptr<PlatformVerificationFlow> platform_verification_flow_; |
| 49 | 49 |
| 50 base::WeakPtrFactory<PlatformVerificationImpl> weak_factory_; | 50 base::WeakPtrFactory<PlatformVerificationImpl> weak_factory_; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace attestation | 53 } // namespace attestation |
| 54 } // namespace chromeos | 54 } // namespace chromeos |
| 55 | 55 |
| 56 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_IMPL_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_IMPL_H_ |
| OLD | NEW |