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

Unified Diff: ppapi/proxy/ppp_printing_proxy.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppp_instance_proxy_unittest.cc ('k') | ppapi/proxy/raw_var_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppp_printing_proxy.cc
diff --git a/ppapi/proxy/ppp_printing_proxy.cc b/ppapi/proxy/ppp_printing_proxy.cc
index 7b2ae55d9277d9ae7de95cb0d9bcc96559a36c54..780b91fdf473a77f6a60d19cc9dd619f64769873 100644
--- a/ppapi/proxy/ppp_printing_proxy.cc
+++ b/ppapi/proxy/ppp_printing_proxy.cc
@@ -6,6 +6,7 @@
#include <string.h>
+#include "base/numerics/safe_conversions.h"
#include "ppapi/c/dev/ppp_printing_dev.h"
#include "ppapi/proxy/host_dispatcher.h"
#include "ppapi/proxy/plugin_dispatcher.h"
@@ -180,7 +181,7 @@ void PPP_Printing_Proxy::OnPluginMsgPrintPages(
PP_Resource plugin_resource = CallWhileUnlocked(
ppp_printing_impl_->PrintPages,
- instance, &pages[0], pages.size());
+ instance, &pages[0], base::checked_cast<uint32_t>(pages.size()));
ResourceTracker* resource_tracker = PpapiGlobals::Get()->GetResourceTracker();
Resource* resource_object = resource_tracker->GetResource(plugin_resource);
if (!resource_object)
« no previous file with comments | « ppapi/proxy/ppp_instance_proxy_unittest.cc ('k') | ppapi/proxy/raw_var_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698