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

Unified Diff: components/cloud_devices/description_items.h

Issue 171683020: Use to base::checked_cast. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | components/cloud_devices/description_items_inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cloud_devices/description_items.h
diff --git a/components/cloud_devices/description_items.h b/components/cloud_devices/description_items.h
index 12fd0b0dd8bad074f04fe93056eccd22d211205d..9fd2de7776dcb07d48bd237c4fd682c312cd751e 100644
--- a/components/cloud_devices/description_items.h
+++ b/components/cloud_devices/description_items.h
@@ -11,7 +11,7 @@
#include <vector>
#include "base/logging.h"
-
+#include "base/numerics/safe_conversions.h"
#include "components/cloud_devices/cloud_device_description.h"
namespace base {
@@ -133,7 +133,7 @@ class SelectionCapability {
if (is_default) {
DCHECK_EQ(default_idx_, -1);
// Point to the last element.
- default_idx_ = static_cast<int>(size());
+ default_idx_ = base::checked_cast<int>(size());
}
options_.push_back(option);
}
« no previous file with comments | « no previous file | components/cloud_devices/description_items_inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698