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

Side by Side Diff: content/public/test/mock_download_manager.h

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: rebase origin/master Created 3 years, 9 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
« no previous file with comments | « content/public/test/mock_download_item.h ('k') | content/public/test/mock_download_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 base::Time end_time; 45 base::Time end_time;
46 std::string etag; 46 std::string etag;
47 std::string last_modified; 47 std::string last_modified;
48 int64_t received_bytes; 48 int64_t received_bytes;
49 int64_t total_bytes; 49 int64_t total_bytes;
50 std::string hash; 50 std::string hash;
51 DownloadItem::DownloadState state; 51 DownloadItem::DownloadState state;
52 DownloadDangerType danger_type; 52 DownloadDangerType danger_type;
53 DownloadInterruptReason interrupt_reason; 53 DownloadInterruptReason interrupt_reason;
54 bool opened; 54 bool opened;
55 base::Time last_access_time;
55 std::vector<DownloadItem::ReceivedSlice> received_slices; 56 std::vector<DownloadItem::ReceivedSlice> received_slices;
56 57
57 CreateDownloadItemAdapter( 58 CreateDownloadItemAdapter(
58 const std::string& guid, 59 const std::string& guid,
59 uint32_t id, 60 uint32_t id,
60 const base::FilePath& current_path, 61 const base::FilePath& current_path,
61 const base::FilePath& target_path, 62 const base::FilePath& target_path,
62 const std::vector<GURL>& url_chain, 63 const std::vector<GURL>& url_chain,
63 const GURL& referrer_url, 64 const GURL& referrer_url,
64 const GURL& site_url, 65 const GURL& site_url,
65 const GURL& tab_url, 66 const GURL& tab_url,
66 const GURL& tab_refererr_url, 67 const GURL& tab_refererr_url,
67 const std::string& mime_type, 68 const std::string& mime_type,
68 const std::string& original_mime_type, 69 const std::string& original_mime_type,
69 const base::Time& start_time, 70 base::Time start_time,
70 const base::Time& end_time, 71 base::Time end_time,
71 const std::string& etag, 72 const std::string& etag,
72 const std::string& last_modified, 73 const std::string& last_modified,
73 int64_t received_bytes, 74 int64_t received_bytes,
74 int64_t total_bytes, 75 int64_t total_bytes,
75 const std::string& hash, 76 const std::string& hash,
76 DownloadItem::DownloadState state, 77 DownloadItem::DownloadState state,
77 DownloadDangerType danger_type, 78 DownloadDangerType danger_type,
78 DownloadInterruptReason interrupt_reason, 79 DownloadInterruptReason interrupt_reason,
79 bool opened, 80 bool opened,
81 base::Time last_access_time,
80 const std::vector<DownloadItem::ReceivedSlice>& received_slices); 82 const std::vector<DownloadItem::ReceivedSlice>& received_slices);
81 // Required by clang compiler. 83 // Required by clang compiler.
82 CreateDownloadItemAdapter(const CreateDownloadItemAdapter& rhs); 84 CreateDownloadItemAdapter(const CreateDownloadItemAdapter& rhs);
83 ~CreateDownloadItemAdapter(); 85 ~CreateDownloadItemAdapter();
84 86
85 bool operator==(const CreateDownloadItemAdapter& rhs) const; 87 bool operator==(const CreateDownloadItemAdapter& rhs) const;
86 }; 88 };
87 89
88 MockDownloadManager(); 90 MockDownloadManager();
89 ~MockDownloadManager() override; 91 ~MockDownloadManager() override;
(...skipping 30 matching lines...) Expand all
120 uint32_t id, 122 uint32_t id,
121 const base::FilePath& current_path, 123 const base::FilePath& current_path,
122 const base::FilePath& target_path, 124 const base::FilePath& target_path,
123 const std::vector<GURL>& url_chain, 125 const std::vector<GURL>& url_chain,
124 const GURL& referrer_url, 126 const GURL& referrer_url,
125 const GURL& site_url, 127 const GURL& site_url,
126 const GURL& tab_url, 128 const GURL& tab_url,
127 const GURL& tab_refererr_url, 129 const GURL& tab_refererr_url,
128 const std::string& mime_type, 130 const std::string& mime_type,
129 const std::string& original_mime_type, 131 const std::string& original_mime_type,
130 const base::Time& start_time, 132 base::Time start_time,
131 const base::Time& end_time, 133 base::Time end_time,
132 const std::string& etag, 134 const std::string& etag,
133 const std::string& last_modified, 135 const std::string& last_modified,
134 int64_t received_bytes, 136 int64_t received_bytes,
135 int64_t total_bytes, 137 int64_t total_bytes,
136 const std::string& hash, 138 const std::string& hash,
137 DownloadItem::DownloadState state, 139 DownloadItem::DownloadState state,
138 DownloadDangerType danger_type, 140 DownloadDangerType danger_type,
139 DownloadInterruptReason interrupt_reason, 141 DownloadInterruptReason interrupt_reason,
140 bool opened, 142 bool opened,
143 base::Time last_access_time,
141 const std::vector<DownloadItem::ReceivedSlice>& received_slices) override; 144 const std::vector<DownloadItem::ReceivedSlice>& received_slices) override;
142 145
143 MOCK_METHOD1(MockCreateDownloadItem, 146 MOCK_METHOD1(MockCreateDownloadItem,
144 DownloadItem*(CreateDownloadItemAdapter adapter)); 147 DownloadItem*(CreateDownloadItemAdapter adapter));
145 148
146 MOCK_CONST_METHOD0(InProgressCount, int()); 149 MOCK_CONST_METHOD0(InProgressCount, int());
147 MOCK_CONST_METHOD0(NonMaliciousInProgressCount, int()); 150 MOCK_CONST_METHOD0(NonMaliciousInProgressCount, int());
148 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); 151 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*());
149 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); 152 MOCK_METHOD0(CheckForHistoryFilesRemoval, void());
150 MOCK_METHOD1(GetDownload, DownloadItem*(uint32_t id)); 153 MOCK_METHOD1(GetDownload, DownloadItem*(uint32_t id));
151 MOCK_METHOD1(GetDownloadByGuid, DownloadItem*(const std::string&)); 154 MOCK_METHOD1(GetDownloadByGuid, DownloadItem*(const std::string&));
152 }; 155 };
153 156
154 } // namespace content 157 } // namespace content
155 158
156 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ 159 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « content/public/test/mock_download_item.h ('k') | content/public/test/mock_download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698