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

Unified Diff: net/websockets/websocket_channel.cc

Issue 141113003: Refactor base/safe_numerics.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 | « net/websockets/websocket_basic_stream.cc ('k') | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_channel.cc
===================================================================
--- net/websockets/websocket_channel.cc (revision 245415)
+++ net/websockets/websocket_channel.cc (working copy)
@@ -9,7 +9,7 @@
#include "base/basictypes.h" // for size_t
#include "base/bind.h"
#include "base/compiler_specific.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "net/base/big_endian.h"
@@ -190,7 +190,7 @@
NOTREACHED() << "SendFrame() called in state " << state_;
return;
}
- if (data.size() > base::checked_numeric_cast<size_t>(current_send_quota_)) {
+ if (data.size() > base::checked_cast<size_t>(current_send_quota_)) {
AllowUnused(FailChannel(SEND_GOING_AWAY,
kWebSocketMuxErrorSendQuotaViolation,
"Send quota exceeded"));
« no previous file with comments | « net/websockets/websocket_basic_stream.cc ('k') | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698