| 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 CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ | 5 #ifndef CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ |
| 6 #define CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ | 6 #define CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 int64_t GetTotalBytes() const override; | 108 int64_t GetTotalBytes() const override; |
| 109 int64_t GetReceivedBytes() const override; | 109 int64_t GetReceivedBytes() const override; |
| 110 const std::vector<DownloadItem::ReceivedSlice>& GetReceivedSlices() | 110 const std::vector<DownloadItem::ReceivedSlice>& GetReceivedSlices() |
| 111 const override; | 111 const override; |
| 112 bool CanShowInFolder() override; | 112 bool CanShowInFolder() override; |
| 113 bool CanOpenDownload() override; | 113 bool CanOpenDownload() override; |
| 114 bool ShouldOpenFileBasedOnExtension() override; | 114 bool ShouldOpenFileBasedOnExtension() override; |
| 115 bool GetOpenWhenComplete() const override; | 115 bool GetOpenWhenComplete() const override; |
| 116 bool GetAutoOpened() override; | 116 bool GetAutoOpened() override; |
| 117 bool GetOpened() const override; | 117 bool GetOpened() const override; |
| 118 base::Time GetLastAccessTime() const override; |
| 118 content::BrowserContext* GetBrowserContext() const override; | 119 content::BrowserContext* GetBrowserContext() const override; |
| 119 content::WebContents* GetWebContents() const override; | 120 content::WebContents* GetWebContents() const override; |
| 120 void OnContentCheckCompleted( | 121 void OnContentCheckCompleted( |
| 121 content::DownloadDangerType danger_type) override; | 122 content::DownloadDangerType danger_type) override; |
| 122 void SetOpenWhenComplete(bool open) override; | 123 void SetOpenWhenComplete(bool open) override; |
| 123 void SetOpened(bool opened) override; | 124 void SetOpened(bool opened) override; |
| 125 void SetLastAccessTime(const base::Time& time) override; |
| 124 void SetDisplayName(const base::FilePath& name) override; | 126 void SetDisplayName(const base::FilePath& name) override; |
| 125 std::string DebugString(bool verbose) const override; | 127 std::string DebugString(bool verbose) const override; |
| 126 | 128 |
| 127 private: | 129 private: |
| 128 base::ObserverList<Observer> observers_; | 130 base::ObserverList<Observer> observers_; |
| 129 uint32_t id_; | 131 uint32_t id_; |
| 130 GURL url_; | 132 GURL url_; |
| 131 base::FilePath file_path_; | 133 base::FilePath file_path_; |
| 132 bool is_file_externally_removed_; | 134 bool is_file_externally_removed_; |
| 133 base::Time start_time_; | 135 base::Time start_time_; |
| 134 base::Time end_time_; | 136 base::Time end_time_; |
| 135 DownloadState download_state_; | 137 DownloadState download_state_; |
| 136 std::string mime_type_; | 138 std::string mime_type_; |
| 137 GURL original_url_; | 139 GURL original_url_; |
| 138 | 140 |
| 139 // The members below are to be returned by methods, which return by reference. | 141 // The members below are to be returned by methods, which return by reference. |
| 140 std::string dummy_string; | 142 std::string dummy_string; |
| 141 std::vector<GURL> dummy_url_vector; | 143 std::vector<GURL> dummy_url_vector; |
| 142 GURL dummy_url; | 144 GURL dummy_url; |
| 143 base::FilePath dummy_file_path; | 145 base::FilePath dummy_file_path; |
| 144 | 146 |
| 145 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem); | 147 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem); |
| 146 }; | 148 }; |
| 147 | 149 |
| 148 } // namespace test | 150 } // namespace test |
| 149 | 151 |
| 150 #endif // CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ | 152 #endif // CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ |
| OLD | NEW |