| OLD | NEW |
| 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 Loading... |
| 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 SetResponseCode(int response_code); |
| 67 int GetResponseCode() const override; |
| 68 |
| 66 void SetMimeType(const std::string& mime_type); | 69 void SetMimeType(const std::string& mime_type); |
| 67 std::string GetMimeType() const override; | 70 std::string GetMimeType() const override; |
| 68 | 71 |
| 69 void SetOriginalUrl(const GURL& url); | 72 void SetOriginalUrl(const GURL& url); |
| 70 const GURL& GetOriginalUrl() const override; | 73 const GURL& GetOriginalUrl() const override; |
| 71 | 74 |
| 72 void SetLastReason(DownloadInterruptReason last_reason); | 75 void SetLastReason(DownloadInterruptReason last_reason); |
| 73 DownloadInterruptReason GetLastReason() const override; | 76 DownloadInterruptReason GetLastReason() const override; |
| 74 | 77 |
| 75 void SetReceivedBytes(int64_t received_bytes); | 78 void SetReceivedBytes(int64_t received_bytes); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 GURL url_; | 145 GURL url_; |
| 143 std::vector<GURL> url_chain_; | 146 std::vector<GURL> url_chain_; |
| 144 base::FilePath file_path_; | 147 base::FilePath file_path_; |
| 145 bool is_file_externally_removed_ = false; | 148 bool is_file_externally_removed_ = false; |
| 146 base::Time start_time_; | 149 base::Time start_time_; |
| 147 base::Time end_time_; | 150 base::Time end_time_; |
| 148 base::Time last_access_time_; | 151 base::Time last_access_time_; |
| 149 // MAX_DOWNLOAD_STATE is used as the uninitialized state. | 152 // MAX_DOWNLOAD_STATE is used as the uninitialized state. |
| 150 DownloadState download_state_ = | 153 DownloadState download_state_ = |
| 151 DownloadItem::DownloadState::MAX_DOWNLOAD_STATE; | 154 DownloadItem::DownloadState::MAX_DOWNLOAD_STATE; |
| 155 int response_code_ = 0; |
| 152 std::string mime_type_; | 156 std::string mime_type_; |
| 153 GURL original_url_; | 157 GURL original_url_; |
| 154 DownloadInterruptReason last_reason_ = | 158 DownloadInterruptReason last_reason_ = |
| 155 DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE; | 159 DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE; |
| 156 int64_t received_bytes_ = 0; | 160 int64_t received_bytes_ = 0; |
| 157 | 161 |
| 158 // The members below are to be returned by methods, which return by reference. | 162 // The members below are to be returned by methods, which return by reference. |
| 159 std::string dummy_string; | 163 std::string dummy_string; |
| 160 GURL dummy_url; | 164 GURL dummy_url; |
| 161 base::FilePath dummy_file_path; | 165 base::FilePath dummy_file_path; |
| 162 | 166 |
| 163 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem); | 167 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem); |
| 164 }; | 168 }; |
| 165 | 169 |
| 166 } // namespace content | 170 } // namespace content |
| 167 | 171 |
| 168 #endif // CONTENT_PUBLIC_TEST_FAKE_DOWNLOAD_ITEM_H_ | 172 #endif // CONTENT_PUBLIC_TEST_FAKE_DOWNLOAD_ITEM_H_ |
| OLD | NEW |