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

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

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 4 years, 12 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>
9
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
12 #include "base/time/time.h" 14 #include "base/time/time.h"
13 #include "components/history/core/browser/download_types.h" 15 #include "components/history/core/browser/download_types.h"
14 #include "url/gurl.h" 16 #include "url/gurl.h"
15 17
16 namespace history { 18 namespace history {
17 19
18 // Contains the information that is stored in the download system's persistent 20 // Contains the information that is stored in the download system's persistent
19 // store (or refers to it). DownloadHistory uses this to communicate with the 21 // store (or refers to it). DownloadHistory uses this to communicate with the
20 // DownloadDatabase through the HistoryService. 22 // DownloadDatabase through the HistoryService.
21 struct DownloadRow { 23 struct DownloadRow {
22 DownloadRow(); 24 DownloadRow();
23 DownloadRow(const base::FilePath& current_path, 25 DownloadRow(const base::FilePath& current_path,
24 const base::FilePath& target_path, 26 const base::FilePath& target_path,
25 const std::vector<GURL>& url_chain, 27 const std::vector<GURL>& url_chain,
26 const GURL& referrer, 28 const GURL& referrer,
27 const std::string& mime_type, 29 const std::string& mime_type,
28 const std::string& original_mime_type, 30 const std::string& original_mime_type,
29 const base::Time& start, 31 const base::Time& start,
30 const base::Time& end, 32 const base::Time& end,
31 const std::string& etag, 33 const std::string& etag,
32 const std::string& last_modified, 34 const std::string& last_modified,
33 int64 received, 35 int64_t received,
34 int64 total, 36 int64_t total,
35 DownloadState download_state, 37 DownloadState download_state,
36 DownloadDangerType danger_type, 38 DownloadDangerType danger_type,
37 DownloadInterruptReason interrupt_reason, 39 DownloadInterruptReason interrupt_reason,
38 DownloadId id, 40 DownloadId id,
39 bool download_opened, 41 bool download_opened,
40 const std::string& ext_id, 42 const std::string& ext_id,
41 const std::string& ext_name); 43 const std::string& ext_name);
42 ~DownloadRow(); 44 ~DownloadRow();
43 45
44 // The current path to the download (potentially different from final if 46 // The current path to the download (potentially different from final if
(...skipping 24 matching lines...) Expand all
69 // The time when the download completed. 71 // The time when the download completed.
70 base::Time end_time; 72 base::Time end_time;
71 73
72 // Contents of most recently seen ETag header. 74 // Contents of most recently seen ETag header.
73 std::string etag; 75 std::string etag;
74 76
75 // Contents of most recently seen Last-Modified header. 77 // Contents of most recently seen Last-Modified header.
76 std::string last_modified; 78 std::string last_modified;
77 79
78 // The number of bytes received (so far). 80 // The number of bytes received (so far).
79 int64 received_bytes; 81 int64_t received_bytes;
80 82
81 // The total number of bytes in the download. Is not changed by 83 // The total number of bytes in the download. Is not changed by
82 // UpdateDownload(). 84 // UpdateDownload().
83 int64 total_bytes; 85 int64_t total_bytes;
84 86
85 // The current state of the download. 87 // The current state of the download.
86 DownloadState state; 88 DownloadState state;
87 89
88 // Whether and how the download is dangerous. 90 // Whether and how the download is dangerous.
89 DownloadDangerType danger_type; 91 DownloadDangerType danger_type;
90 92
91 // The reason the download was interrupted, if state == kStateInterrupted. 93 // The reason the download was interrupted, if state == kStateInterrupted.
92 DownloadInterruptReason interrupt_reason; 94 DownloadInterruptReason interrupt_reason;
93 95
94 // The id of the download in the database. Is not changed by UpdateDownload(). 96 // The id of the download in the database. Is not changed by UpdateDownload().
95 DownloadId id; 97 DownloadId id;
96 98
97 // Whether this download has ever been opened from the browser. 99 // Whether this download has ever been opened from the browser.
98 bool opened; 100 bool opened;
99 101
100 // The id and name of the extension that created this download. 102 // The id and name of the extension that created this download.
101 std::string by_ext_id; 103 std::string by_ext_id;
102 std::string by_ext_name; 104 std::string by_ext_name;
103 }; 105 };
104 106
105 } // namespace history 107 } // namespace history
106 108
107 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 109 #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