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

Side by Side Diff: components/history/core/browser/download_slice_info.h

Issue 2665243003: add a download slices table into history download db (Closed)
Patch Set: rename download_job_info to download_slice_info 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 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 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_SLICE_INFO_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_SLICE_INFO_H_
7
8 #include <stdint.h>
9 #include <string>
10
11 #include "components/history/core/browser/download_types.h"
12
13 namespace history {
14
15 // Contains the information for each slice of data that is written to the
16 // download target file. A download file can have multiple slices and cach
17 // slice will have a different offset.
18 struct DownloadSliceInfo {
19 DownloadSliceInfo();
20 DownloadSliceInfo(DownloadId download_id,
21 int64_t offset,
22 int64_t received_bytes);
23 DownloadSliceInfo(const DownloadSliceInfo& other);
24 ~DownloadSliceInfo();
25
26 bool operator==(const DownloadSliceInfo&) const;
27
28 // The id of the download in the database.
29 DownloadId download_id;
30
31 // Start position of the download request.
32 int64_t offset;
33
34 // The number of bytes received (so far).
35 int64_t received_bytes;
36 };
37
38 } // namespace history
39
40 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_SLICE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698