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

Side by Side Diff: components/history/core/browser/download_job_info.cc

Issue 2665243003: add a download slices table into history download db (Closed)
Patch Set: addressing comments Created 3 years, 10 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
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
sky 2017/02/03 16:02:34 no (c)
qinmin 2017/02/04 00:06:56 Done.
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_job_info.h"
6
7 #include "components/history/core/browser/download_constants.h"
8
9 namespace history {
10
11 DownloadJobInfo::DownloadJobInfo()
12 : download_id(0),
sky 2017/02/03 16:02:34 kInvalidDownloadId?
qinmin 2017/02/04 00:06:56 Done.
13 start_position(0),
14 length(0),
15 received_bytes(0),
16 state(DownloadState::IN_PROGRESS),
sky 2017/02/03 16:02:34 You sure you don't want interrupted?
qinmin 2017/02/04 00:06:56 When a job is created, it should always in the sta
17 interrupt_reason(0) {}
18
19 DownloadJobInfo::DownloadJobInfo(DownloadId download_id,
20 int job_id,
21 int64_t start_position,
22 int64_t length,
23 int64_t received_bytes,
24 DownloadState state,
25 DownloadInterruptReason interrupt_reason)
26 : download_id(download_id),
27 job_id(job_id),
28 start_position(start_position),
29 length(length),
30 received_bytes(received_bytes),
31 state(state),
32 interrupt_reason(interrupt_reason) {}
33
34 DownloadJobInfo::DownloadJobInfo(const DownloadJobInfo& other) = default;
35
36 DownloadJobInfo::~DownloadJobInfo() = default;
37
38 bool DownloadJobInfo::operator==(const DownloadJobInfo& rhs) const {
39 return download_id == rhs.download_id && job_id == rhs.job_id &&
40 start_position == rhs.start_position &&
41 length == rhs.length &&
42 received_bytes == rhs.received_bytes && state == rhs.state &&
43 interrupt_reason == rhs.interrupt_reason;
44 }
45
46 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698