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

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

Issue 2809953002: Make the download's response headers available in the DownloadItem (Closed)
Patch Set: comment Created 3 years, 8 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/browser/download_item.h ('k') | content/public/test/fake_download_item.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_FAKE_DOWNLOAD_ITEM_H_ 5 #ifndef CONTENT_PUBLIC_TEST_FAKE_DOWNLOAD_ITEM_H_
6 #define CONTENT_PUBLIC_TEST_FAKE_DOWNLOAD_ITEM_H_ 6 #define CONTENT_PUBLIC_TEST_FAKE_DOWNLOAD_ITEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void SetStartTime(base::Time start_time); 57 void SetStartTime(base::Time start_time);
58 base::Time GetStartTime() const override; 58 base::Time GetStartTime() const override;
59 59
60 void SetEndTime(base::Time end_time); 60 void SetEndTime(base::Time end_time);
61 base::Time GetEndTime() const override; 61 base::Time GetEndTime() const override;
62 62
63 void SetState(const DownloadState& state); 63 void SetState(const DownloadState& state);
64 DownloadState GetState() const override; 64 DownloadState GetState() const override;
65 65
66 void SetResponseHeaders(
67 scoped_refptr<const net::HttpResponseHeaders> response_headers);
68 const scoped_refptr<const net::HttpResponseHeaders>& GetResponseHeaders()
69 const override;
70
66 void SetMimeType(const std::string& mime_type); 71 void SetMimeType(const std::string& mime_type);
67 std::string GetMimeType() const override; 72 std::string GetMimeType() const override;
68 73
69 void SetOriginalUrl(const GURL& url); 74 void SetOriginalUrl(const GURL& url);
70 const GURL& GetOriginalUrl() const override; 75 const GURL& GetOriginalUrl() const override;
71 76
72 void SetLastReason(DownloadInterruptReason last_reason); 77 void SetLastReason(DownloadInterruptReason last_reason);
73 DownloadInterruptReason GetLastReason() const override; 78 DownloadInterruptReason GetLastReason() const override;
74 79
75 void SetReceivedBytes(int64_t received_bytes); 80 void SetReceivedBytes(int64_t received_bytes);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 GURL url_; 147 GURL url_;
143 std::vector<GURL> url_chain_; 148 std::vector<GURL> url_chain_;
144 base::FilePath file_path_; 149 base::FilePath file_path_;
145 bool is_file_externally_removed_ = false; 150 bool is_file_externally_removed_ = false;
146 base::Time start_time_; 151 base::Time start_time_;
147 base::Time end_time_; 152 base::Time end_time_;
148 base::Time last_access_time_; 153 base::Time last_access_time_;
149 // MAX_DOWNLOAD_STATE is used as the uninitialized state. 154 // MAX_DOWNLOAD_STATE is used as the uninitialized state.
150 DownloadState download_state_ = 155 DownloadState download_state_ =
151 DownloadItem::DownloadState::MAX_DOWNLOAD_STATE; 156 DownloadItem::DownloadState::MAX_DOWNLOAD_STATE;
157 scoped_refptr<const net::HttpResponseHeaders> response_headers_;
152 std::string mime_type_; 158 std::string mime_type_;
153 GURL original_url_; 159 GURL original_url_;
154 DownloadInterruptReason last_reason_ = 160 DownloadInterruptReason last_reason_ =
155 DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE; 161 DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE;
156 int64_t received_bytes_ = 0; 162 int64_t received_bytes_ = 0;
157 163
158 // The members below are to be returned by methods, which return by reference. 164 // The members below are to be returned by methods, which return by reference.
159 std::string dummy_string; 165 std::string dummy_string;
160 GURL dummy_url; 166 GURL dummy_url;
161 base::FilePath dummy_file_path; 167 base::FilePath dummy_file_path;
162 168
163 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem); 169 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem);
164 }; 170 };
165 171
166 } // namespace content 172 } // namespace content
167 173
168 #endif // CONTENT_PUBLIC_TEST_FAKE_DOWNLOAD_ITEM_H_ 174 #endif // CONTENT_PUBLIC_TEST_FAKE_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/test/fake_download_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698