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

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

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 Created 5 years, 10 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
« no previous file with comments | « ppapi/proxy/pdf_resource.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ppapi/proxy/pdf_resource.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698