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

Unified Diff: content/browser/vibration/vibration_message_filter.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/vibration/vibration_message_filter.cc
===================================================================
--- content/browser/vibration/vibration_message_filter.cc (revision 245415)
+++ content/browser/vibration/vibration_message_filter.cc (working copy)
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "content/common/view_messages.h"
#include "content/port/browser/vibration_provider.h"
#include "content/public/browser/content_browser_client.h"
@@ -48,7 +48,7 @@
// Though the Blink implementation already sanitizes vibration times, don't
// trust any values passed from the renderer.
milliseconds = std::max(kMinimumVibrationDurationMs, std::min(milliseconds,
- base::checked_numeric_cast<int64>(blink::kVibrationDurationMax)));
+ base::checked_cast<int64>(blink::kVibrationDurationMax)));
provider_->Vibrate(milliseconds);
}

Powered by Google App Engine
This is Rietveld 408576698