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

Side by Side Diff: third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pull whole protobuf Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // http://code.google.com/p/protobuf/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above 11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer 12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the 13 // in the documentation and/or other materials provided with the
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // implements ZeroCopyInputStream ---------------------------------- 337 // implements ZeroCopyInputStream ----------------------------------
338 bool Next(const void** data, int* size); 338 bool Next(const void** data, int* size);
339 void BackUp(int count); 339 void BackUp(int count);
340 bool Skip(int count); 340 bool Skip(int count);
341 int64 ByteCount() const; 341 int64 ByteCount() const;
342 342
343 343
344 private: 344 private:
345 ZeroCopyInputStream* input_; 345 ZeroCopyInputStream* input_;
346 int64 limit_; // Decreases as we go, becomes negative if we overshoot. 346 int64 limit_; // Decreases as we go, becomes negative if we overshoot.
347 int64 prior_bytes_read_; // Bytes read on underlying stream at construction
347 348
348 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LimitingInputStream); 349 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LimitingInputStream);
349 }; 350 };
350 351
351 // =================================================================== 352 // ===================================================================
352 353
353 } // namespace io 354 } // namespace io
354 } // namespace protobuf 355 } // namespace protobuf
355 356
356 } // namespace google 357 } // namespace google
357 #endif // GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_H__ 358 #endif // GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698