| Index: components/history/core/browser/download_job_info.cc
|
| diff --git a/components/history/core/browser/download_job_info.cc b/components/history/core/browser/download_job_info.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..950d325dccef6845eed1a529b0b539c27f5a3d81
|
| --- /dev/null
|
| +++ b/components/history/core/browser/download_job_info.cc
|
| @@ -0,0 +1,46 @@
|
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/history/core/browser/download_job_info.h"
|
| +
|
| +#include "components/history/core/browser/download_constants.h"
|
| +
|
| +namespace history {
|
| +
|
| +DownloadJobInfo::DownloadJobInfo()
|
| + : id(0),
|
| + start_position(0),
|
| + length(0),
|
| + received_bytes(0),
|
| + state(DownloadState::IN_PROGRESS),
|
| + interrupt_reason(0) {}
|
| +
|
| +DownloadJobInfo::DownloadJobInfo(DownloadId id,
|
| + int job_id,
|
| + int64_t start_position,
|
| + int64_t length,
|
| + int64_t received_bytes,
|
| + DownloadState state,
|
| + DownloadInterruptReason interrupt_reason)
|
| + : id(id),
|
| + job_id(job_id),
|
| + start_position(start_position),
|
| + length(length),
|
| + received_bytes(received_bytes),
|
| + state(state),
|
| + interrupt_reason(interrupt_reason) {}
|
| +
|
| +DownloadJobInfo::DownloadJobInfo(const DownloadJobInfo& other) = default;
|
| +
|
| +DownloadJobInfo::~DownloadJobInfo() = default;
|
| +
|
| +bool DownloadJobInfo::operator==(const DownloadJobInfo& rhs) const {
|
| + return id == rhs.id && job_id == rhs.job_id &&
|
| + start_position == rhs.start_position &&
|
| + length == rhs.length &&
|
| + received_bytes == rhs.received_bytes && state == rhs.state &&
|
| + interrupt_reason == rhs.interrupt_reason;
|
| +}
|
| +
|
| +} // namespace history
|
|
|