upload_progress.h 663 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_BASE_UPLOAD_PROGRESS_H_
  5. #define NET_BASE_UPLOAD_PROGRESS_H_
  6. #include <stdint.h>
  7. namespace net {
  8. class UploadProgress {
  9. public:
  10. UploadProgress() : size_(0), position_(0) {}
  11. UploadProgress(uint64_t position, uint64_t size)
  12. : size_(size), position_(position) {}
  13. uint64_t size() const { return size_; }
  14. uint64_t position() const { return position_; }
  15. private:
  16. uint64_t size_;
  17. uint64_t position_;
  18. };
  19. } // namespace net
  20. #endif // NET_BASE_UPLOAD_PROGRESS_H_