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