OLD | NEW |
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 "ppapi/proxy/platform_verification_private_resource.h" | 5 #include "ppapi/proxy/platform_verification_private_resource.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/proxy/dispatch_reply_message.h" | 9 #include "ppapi/proxy/dispatch_reply_message.h" |
10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const std::vector<uint8_t>& raw_signed_data_signature, | 81 const std::vector<uint8_t>& raw_signed_data_signature, |
82 const std::string& raw_platform_key_certificate) { | 82 const std::string& raw_platform_key_certificate) { |
83 if (!TrackedCallback::IsPending(output_params.callback) || | 83 if (!TrackedCallback::IsPending(output_params.callback) || |
84 TrackedCallback::IsScheduledToRun(output_params.callback)) { | 84 TrackedCallback::IsScheduledToRun(output_params.callback)) { |
85 return; | 85 return; |
86 } | 86 } |
87 | 87 |
88 if (params.result() == PP_OK) { | 88 if (params.result() == PP_OK) { |
89 *(output_params.signed_data) = | 89 *(output_params.signed_data) = |
90 (PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferVar( | 90 (PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferVar( |
91 raw_signed_data.size(), &raw_signed_data.front()))->GetPPVar(); | 91 static_cast<uint32_t>(raw_signed_data.size()), |
| 92 &raw_signed_data.front()))->GetPPVar(); |
92 *(output_params.signed_data_signature) = | 93 *(output_params.signed_data_signature) = |
93 (PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferVar( | 94 (PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferVar( |
94 raw_signed_data_signature.size(), | 95 static_cast<uint32_t>(raw_signed_data_signature.size()), |
95 &raw_signed_data_signature.front()))->GetPPVar(); | 96 &raw_signed_data_signature.front()))->GetPPVar(); |
96 *(output_params.platform_key_certificate) = | 97 *(output_params.platform_key_certificate) = |
97 (new StringVar(raw_platform_key_certificate))->GetPPVar(); | 98 (new StringVar(raw_platform_key_certificate))->GetPPVar(); |
98 } | 99 } |
99 output_params.callback->Run(params.result()); | 100 output_params.callback->Run(params.result()); |
100 } | 101 } |
101 | 102 |
102 } // namespace proxy | 103 } // namespace proxy |
103 } // namespace ppapi | 104 } // namespace ppapi |
OLD | NEW |