Add constructors for IOBuffer that take the buffer length as a size_t.
commit23ba60b3b6e4e6cfa36684ddf621a6afcc6906e4
authoreroman <eroman@chromium.org>
Wed, 27 May 2015 00:09:39 +0000 (26 17:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 27 May 2015 00:10:16 +0000 (27 00:10 +0000)
tree8e9a0317f14438060b0e05dc7124949d63404792
parentcf6445f354b088fb5abe6d0243d654d048b3a647
Add constructors for IOBuffer that take the buffer length as a size_t.

Once the consumers have all been updated to work with unsigned buffer lengths, I will remove the signed int versions. For now this change adds some runtime safety checks, and facilitates the ongoing conversion to size_t.

A minority of consumers were calling IOBuffer with something other than "int" or "size_t", and those were updated by this change.

BUG=488553,491315
TBR=michaeln@chromium.org,pfeldman@chromium.org,bradnelson@chromium.org, rockot@chromium.org, dimich@chromium.org

Review URL: https://codereview.chromium.org/1147333003

Cr-Commit-Position: refs/heads/master@{#331485}
15 files changed:
chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc
chrome/browser/devtools/device/usb/android_usb_device.cc
components/nacl/browser/pnacl_host.cc
content/browser/appcache/appcache_response.cc
content/browser/appcache/view_appcache_internals_job.cc
device/hid/hid_connection_mac.cc
google_apis/gcm/base/socket_stream.cc
net/base/io_buffer.cc
net/base/io_buffer.h
net/quic/quic_http_stream.cc
net/quic/quic_packet_reader.cc
net/socket/ssl_client_socket_nss.cc
net/socket/ssl_server_socket_nss.cc
net/websockets/websocket_deflater.cc
net/websockets/websocket_inflater.cc