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

Side by Side Diff: ppapi/proxy/platform_verification_private_resource.cc

Issue 1548813002: Switch to standard integer types in ppapi/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years 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 "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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 StringVar* service_id_str = StringVar::FromPPVar(service_id); 49 StringVar* service_id_str = StringVar::FromPPVar(service_id);
50 if (!service_id_str) 50 if (!service_id_str)
51 return PP_ERROR_BADARGUMENT; 51 return PP_ERROR_BADARGUMENT;
52 52
53 scoped_refptr<ArrayBufferVar> challenge_buffer = 53 scoped_refptr<ArrayBufferVar> challenge_buffer =
54 ArrayBufferVar::FromPPVar(challenge); 54 ArrayBufferVar::FromPPVar(challenge);
55 if (!challenge_buffer.get()) 55 if (!challenge_buffer.get())
56 return PP_ERROR_BADARGUMENT; 56 return PP_ERROR_BADARGUMENT;
57 57
58 uint8_t* challenge_data = static_cast<uint8_t*>(challenge_buffer->Map()); 58 uint8_t* challenge_data = static_cast<uint8_t*>(challenge_buffer->Map());
59 uint32 challenge_length = challenge_buffer->ByteLength(); 59 uint32_t challenge_length = challenge_buffer->ByteLength();
60 std::vector<uint8_t> challenge_vector(challenge_data, 60 std::vector<uint8_t> challenge_vector(challenge_data,
61 challenge_data + challenge_length); 61 challenge_data + challenge_length);
62 challenge_buffer->Unmap(); 62 challenge_buffer->Unmap();
63 63
64 PpapiHostMsg_PlatformVerification_ChallengePlatform challenge_message( 64 PpapiHostMsg_PlatformVerification_ChallengePlatform challenge_message(
65 service_id_str->value(), challenge_vector); 65 service_id_str->value(), challenge_vector);
66 66
67 ChallengePlatformParams output_params = { 67 ChallengePlatformParams output_params = {
68 signed_data, signed_data_signature, platform_key_certificate, callback }; 68 signed_data, signed_data_signature, platform_key_certificate, callback };
69 69
(...skipping 25 matching lines...) Expand all
95 static_cast<uint32_t>(raw_signed_data_signature.size()), 95 static_cast<uint32_t>(raw_signed_data_signature.size()),
96 &raw_signed_data_signature.front()))->GetPPVar(); 96 &raw_signed_data_signature.front()))->GetPPVar();
97 *(output_params.platform_key_certificate) = 97 *(output_params.platform_key_certificate) =
98 (new StringVar(raw_platform_key_certificate))->GetPPVar(); 98 (new StringVar(raw_platform_key_certificate))->GetPPVar();
99 } 99 }
100 output_params.callback->Run(params.result()); 100 output_params.callback->Run(params.result());
101 } 101 }
102 102
103 } // namespace proxy 103 } // namespace proxy
104 } // namespace ppapi 104 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/platform_verification_private_resource.h ('k') | ppapi/proxy/plugin_array_buffer_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698