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

Unified Diff: ppapi/host/error_conversion.cc

Issue 16959005: Implement PPB_UDPSocket_Dev: part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/c/dev/ppb_udp_socket_dev.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/host/error_conversion.cc
diff --git a/ppapi/host/error_conversion.cc b/ppapi/host/error_conversion.cc
index 4fc5b8b696ca6c3ad6c23943b00183ab3bc15f04..da985d399661ae82a03b4050bb3ff1f5a03a0088 100644
--- a/ppapi/host/error_conversion.cc
+++ b/ppapi/host/error_conversion.cc
@@ -4,6 +4,7 @@
#include "ppapi/host/error_conversion.h"
+#include "base/safe_numerics.h"
#include "net/base/net_errors.h"
#include "ppapi/c/pp_errors.h"
@@ -12,7 +13,7 @@ namespace host {
int32_t NetErrorToPepperError(int net_error) {
if (net_error > 0)
- return static_cast<int32_t>(net_error);
+ return base::checked_numeric_cast<int32_t>(net_error);
switch (net_error) {
case net::OK:
« no previous file with comments | « ppapi/c/dev/ppb_udp_socket_dev.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698