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

Unified Diff: ios/web/net/clients/crw_js_injection_network_client.mm

Issue 1544743002: Switch to standard integer types in ios/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « ios/web/net/clients/crw_csp_network_client.mm ('k') | ios/web/net/cookie_notification_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/net/clients/crw_js_injection_network_client.mm
diff --git a/ios/web/net/clients/crw_js_injection_network_client.mm b/ios/web/net/clients/crw_js_injection_network_client.mm
index 832e760e5f57387906386c9bc227dc8f93d3b87d..32c49abeb93aebfbe84e9a17a2ce861afe5bd14c 100644
--- a/ios/web/net/clients/crw_js_injection_network_client.mm
+++ b/ios/web/net/clients/crw_js_injection_network_client.mm
@@ -4,6 +4,9 @@
#import "ios/web/net/clients/crw_js_injection_network_client.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/logging.h"
#include "base/mac/objc_property_releaser.h"
#include "base/mac/scoped_nsobject.h"
@@ -361,7 +364,7 @@ CRNHTTPURLResponse* ResponseWithUpdatedContentSize(
if (!dataLength)
return;
- const uint8* bytes = reinterpret_cast<const uint8*>([firstData bytes]);
+ const uint8_t* bytes = reinterpret_cast<const uint8_t*>([firstData bytes]);
// Construct one data in which to send the content + injected script tag.
base::scoped_nsobject<NSMutableData> combined([[NSMutableData alloc] init]);
@@ -461,7 +464,7 @@ CRNHTTPURLResponse* ResponseWithUpdatedContentSize(
// Do the same check that WebKit does for the byte order mark (BOM), which
// must be right at the beginning of the content to be accepted.
// Info on byte order mark: http://en.wikipedia.org/wiki/Byte_order_mark
- const uint8* bytes = reinterpret_cast<const uint8*>([firstData bytes]);
+ const uint8_t* bytes = reinterpret_cast<const uint8_t*>([firstData bytes]);
if (BytesEqual(bytes, 0xFF, 0xFE)) {
bytes += 2;
@@ -522,7 +525,7 @@ CRNHTTPURLResponse* ResponseWithUpdatedContentSize(
// is not exactly clear about what, if anything, can appear before an XML
// declaration. Can there be white space? Can there be comments? WebKit only
// accepts XML declarations if they are right at the beginning of the content.
- const uint8* bytes = reinterpret_cast<const uint8*>([firstData bytes]);
+ const uint8_t* bytes = reinterpret_cast<const uint8_t*>([firstData bytes]);
if (BytesEqual(bytes, '<', '?', 'x', 'm', 'l')) {
_contentEncoding = NSISOLatin1StringEncoding;
} else if (BytesEqual(bytes, '<', 0, '?', 0, 'x', 0)) {
@@ -565,7 +568,7 @@ CRNHTTPURLResponse* ResponseWithUpdatedContentSize(
NSData* firstData = [_pendingData firstObject];
DCHECK([firstData length] >= kMinimumBytesNeededForHTMLTag);
- const uint8* bytes8 = reinterpret_cast<const uint8*>([firstData bytes]);
+ const uint8_t* bytes8 = reinterpret_cast<const uint8_t*>([firstData bytes]);
WebCore::CharacterProvider provider;
switch (_contentEncoding) {
@@ -573,8 +576,8 @@ CRNHTTPURLResponse* ResponseWithUpdatedContentSize(
case NSUTF16LittleEndianStringEncoding:
case NSUTF32BigEndianStringEncoding:
case NSUTF32LittleEndianStringEncoding: {
- const uint16* bytes16 =
- reinterpret_cast<const uint16*>(bytes8 + _headerLength);
+ const uint16_t* bytes16 =
+ reinterpret_cast<const uint16_t*>(bytes8 + _headerLength);
provider.setContents(bytes16, [firstData length] - _headerLength);
« no previous file with comments | « ios/web/net/clients/crw_csp_network_client.mm ('k') | ios/web/net/cookie_notification_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698