OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 |
| 5 #include "components/history/core/browser/download_slice_info.h" |
| 6 |
| 7 #include "components/history/core/browser/download_constants.h" |
| 8 |
| 9 namespace history { |
| 10 |
| 11 DownloadSliceInfo::DownloadSliceInfo() |
| 12 : download_id(kInvalidDownloadId), |
| 13 offset(0), |
| 14 received_bytes(0) {} |
| 15 |
| 16 DownloadSliceInfo::DownloadSliceInfo(DownloadId download_id, |
| 17 int64_t offset, |
| 18 int64_t received_bytes) |
| 19 : download_id(download_id), |
| 20 offset(offset), |
| 21 received_bytes(received_bytes) {} |
| 22 |
| 23 DownloadSliceInfo::DownloadSliceInfo(const DownloadSliceInfo& other) = default; |
| 24 |
| 25 DownloadSliceInfo::~DownloadSliceInfo() = default; |
| 26 |
| 27 bool DownloadSliceInfo::operator==(const DownloadSliceInfo& rhs) const { |
| 28 return download_id == rhs.download_id && offset == rhs.offset && |
| 29 received_bytes == rhs.received_bytes; |
| 30 } |
| 31 |
| 32 } // namespace history |
OLD | NEW |