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

Unified Diff: content/renderer/pepper/pepper_truetype_font_mac.mm

Issue 131493006: Fix mac build breakage on r245418 (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_truetype_font_mac.mm
===================================================================
--- content/renderer/pepper/pepper_truetype_font_mac.mm (revision 245415)
+++ content/renderer/pepper/pepper_truetype_font_mac.mm (working copy)
@@ -12,7 +12,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/strings/sys_string_conversions.h"
#include "base/sys_byteorder.h"
#include "ppapi/c/dev/ppb_truetype_font_dev.h"
@@ -293,10 +293,10 @@
CFIndex table_size = CFDataGetLength(table_ref);
CFIndex safe_offset =
- std::min(base::checked_numeric_cast<CFIndex>(offset), table_size);
+ std::min(base::checked_cast<CFIndex>(offset), table_size);
CFIndex safe_length =
std::min(table_size - safe_offset,
- base::checked_numeric_cast<CFIndex>(max_data_length));
+ base::checked_cast<CFIndex>(max_data_length));
data->resize(safe_length);
CFDataGetBytes(table_ref, CFRangeMake(safe_offset, safe_length),
reinterpret_cast<UInt8*>(&(*data)[0]));
@@ -341,7 +341,7 @@
}
// Calculate the rest of the header values.
- uint16_t num_tables = base::checked_numeric_cast<uint16_t>(table_count);
+ uint16_t num_tables = base::checked_cast<uint16_t>(table_count);
uint16_t entry_selector = 0;
uint16_t search_range = 1;
while (search_range < num_tables >> 1) {
@@ -386,7 +386,7 @@
}
// Extract a substring if the caller specified an offset or max data length.
- int32_t font_size = base::checked_numeric_cast<int32_t>(font.size());
+ int32_t font_size = base::checked_cast<int32_t>(font.size());
int32_t safe_offset = std::min(offset, font_size);
int32_t safe_length = std::min(font_size - safe_offset, max_data_length);
if (safe_offset || safe_length != font_size)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698