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

Unified Diff: content/browser/speech/google_streaming_remote_engine_unittest.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/browser/speech/google_streaming_remote_engine_unittest.cc
===================================================================
--- content/browser/speech/google_streaming_remote_engine_unittest.cc (revision 245415)
+++ content/browser/speech/google_streaming_remote_engine_unittest.cc (working copy)
@@ -6,7 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/sys_byteorder.h"
#include "content/browser/speech/audio_buffer.h"
@@ -20,7 +20,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::HostToNet32;
-using base::checked_numeric_cast;
+using base::checked_cast;
using net::URLRequestStatus;
using net::TestURLFetcher;
using net::TestURLFetcherFactory;
@@ -490,7 +490,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));
return msg_string;

Powered by Google App Engine
This is Rietveld 408576698