| OLD | NEW |
| 1 // Copyright 2014 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "volume_reader_javascript_stream.h" | 5 #include "volume_reader_javascript_stream.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "third_party/zlib/contrib/minizip/unzip.h" | 10 #include "third_party/zlib/contrib/minizip/unzip.h" |
| 11 | 11 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // Read next chunk only if not at the end of archive. | 248 // Read next chunk only if not at the end of archive. |
| 249 if (archive_size_ <= offset_) | 249 if (archive_size_ <= offset_) |
| 250 return; | 250 return; |
| 251 | 251 |
| 252 int64_t bytes_to_read = | 252 int64_t bytes_to_read = |
| 253 std::min(length, archive_size_ - offset_ /* Positive check above. */); | 253 std::min(length, archive_size_ - offset_ /* Positive check above. */); |
| 254 available_data_ = false; | 254 available_data_ = false; |
| 255 | 255 |
| 256 requestor_->RequestFileChunk(request_id_, offset_, bytes_to_read); | 256 requestor_->RequestFileChunk(request_id_, offset_, bytes_to_read); |
| 257 } | 257 } |
| OLD | NEW |