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

Unified Diff: content/test/mock_google_streaming_server.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
Index: content/test/mock_google_streaming_server.cc
===================================================================
--- content/test/mock_google_streaming_server.cc (revision 245415)
+++ content/test/mock_google_streaming_server.cc (working copy)
@@ -5,7 +5,7 @@
#include "content/test/mock_google_streaming_server.h"
#include "base/bind.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/sys_byteorder.h"
@@ -18,7 +18,7 @@
#include "net/url_request/url_request_status.h"
using base::HostToNet32;
-using base::checked_numeric_cast;
+using base::checked_cast;
namespace content {
@@ -101,7 +101,7 @@
// Prepend 4 byte prefix length indication to the protobuf message as
// envisaged by the google streaming recognition webservice protocol.
- uint32 prefix = HostToNet32(checked_numeric_cast<uint32>(msg_string.size()));
+ uint32 prefix = HostToNet32(checked_cast<uint32>(msg_string.size()));
msg_string.insert(0, reinterpret_cast<char*>(&prefix), sizeof(prefix));
SimulateServerResponse(true, msg_string);
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | gpu/command_buffer/common/gles2_cmd_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698