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

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

Issue 2665243003: add a download slices table into history download db (Closed)
Patch Set: add test file to BUILD.gn 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "components/history/core/browser/download_slice_info.h"
15 #include "components/history/core/browser/download_types.h" 16 #include "components/history/core/browser/download_types.h"
16 #include "url/gurl.h" 17 #include "url/gurl.h"
17 18
18 namespace history { 19 namespace history {
19 20
20 // Contains the information that is stored in the download system's persistent 21 // Contains the information that is stored in the download system's persistent
21 // store (or refers to it). DownloadHistory uses this to communicate with the 22 // store (or refers to it). DownloadHistory uses this to communicate with the
22 // DownloadDatabase through the HistoryService. 23 // DownloadDatabase through the HistoryService.
23 struct DownloadRow { 24 struct DownloadRow {
24 DownloadRow(); 25 DownloadRow();
(...skipping 14 matching lines...) Expand all
39 int64_t received, 40 int64_t received,
40 int64_t total, 41 int64_t total,
41 DownloadState download_state, 42 DownloadState download_state,
42 DownloadDangerType danger_type, 43 DownloadDangerType danger_type,
43 DownloadInterruptReason interrupt_reason, 44 DownloadInterruptReason interrupt_reason,
44 const std::string& hash, 45 const std::string& hash,
45 DownloadId id, 46 DownloadId id,
46 const std::string& guid, 47 const std::string& guid,
47 bool download_opened, 48 bool download_opened,
48 const std::string& ext_id, 49 const std::string& ext_id,
49 const std::string& ext_name); 50 const std::string& ext_name,
51 const std::vector<DownloadSliceInfo>& download_slice_info);
50 DownloadRow(const DownloadRow& other); 52 DownloadRow(const DownloadRow& other);
51 ~DownloadRow(); 53 ~DownloadRow();
52 54
53 bool operator==(const DownloadRow&) const; 55 bool operator==(const DownloadRow&) const;
54 56
55 // The current path to the download (potentially different from final if 57 // The current path to the download (potentially different from final if
56 // download is in progress or interrupted). 58 // download is in progress or interrupted).
57 base::FilePath current_path; 59 base::FilePath current_path;
58 60
59 // The target path where the download will go when it's complete. 61 // The target path where the download will go when it's complete.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 130
129 // The GUID of the download in the database. Not changed by UpdateDownload(). 131 // The GUID of the download in the database. Not changed by UpdateDownload().
130 std::string guid; 132 std::string guid;
131 133
132 // Whether this download has ever been opened from the browser. 134 // Whether this download has ever been opened from the browser.
133 bool opened; 135 bool opened;
134 136
135 // The id and name of the extension that created this download. 137 // The id and name of the extension that created this download.
136 std::string by_ext_id; 138 std::string by_ext_id;
137 std::string by_ext_name; 139 std::string by_ext_name;
140
141 std::vector<DownloadSliceInfo> download_slice_info;
138 }; 142 };
139 143
140 } // namespace history 144 } // namespace history
141 145
142 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 146 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_
OLDNEW
« no previous file with comments | « components/history/core/browser/download_database.cc ('k') | components/history/core/browser/download_row.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698