[GCM] Investigatory CHECKs for crash in parsing stream
commitf8bef1c6b2f9b3585af2dc619246359bba8cfbd1
authorzea <zea@chromium.org>
Thu, 25 Sep 2014 17:58:32 +0000 (25 10:58 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 25 Sep 2014 17:58:53 +0000 (25 17:58 +0000)
tree78c28c3371153f54cef0ce5b328bbd2645cb2430
parentd364e8aedc5c67af3a1086f3673f4cd80540dcdc
[GCM] Investigatory CHECKs for crash in parsing stream

The various places where size_t and uint64 were being used have been converted
to int, so that we can better check to make sure they're non-negative (they're
actually consumed as ints by the protobuf parsing code). Various CHECKS have
therefore been added to verify assumptions.

BUG=409985

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

Cr-Commit-Position: refs/heads/master@{#296741}
google_apis/gcm/base/socket_stream.cc
google_apis/gcm/base/socket_stream.h
google_apis/gcm/base/socket_stream_unittest.cc
google_apis/gcm/engine/connection_handler_impl.cc