| 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 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 content::BrowserContext* GetBrowserContext() const override; | 116 content::BrowserContext* GetBrowserContext() const override; |
| 117 content::WebContents* GetWebContents() const override; | 117 content::WebContents* GetWebContents() const override; |
| 118 void OnContentCheckCompleted( | 118 void OnContentCheckCompleted(content::DownloadDangerType danger_type, |
| 119 content::DownloadDangerType danger_type) override; | 119 bool block_file) override; |
| 120 void SetOpenWhenComplete(bool open) override; | 120 void SetOpenWhenComplete(bool open) override; |
| 121 void SetOpened(bool opened) override; | 121 void SetOpened(bool opened) override; |
| 122 void SetDisplayName(const base::FilePath& name) override; | 122 void SetDisplayName(const base::FilePath& name) override; |
| 123 std::string DebugString(bool verbose) const override; | 123 std::string DebugString(bool verbose) const override; |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 base::ObserverList<Observer> observers_; | 126 base::ObserverList<Observer> observers_; |
| 127 uint32_t id_; | 127 uint32_t id_; |
| 128 GURL url_; | 128 GURL url_; |
| 129 base::FilePath file_path_; | 129 base::FilePath file_path_; |
| 130 bool is_file_externally_removed_; | 130 bool is_file_externally_removed_; |
| 131 base::Time start_time_; | 131 base::Time start_time_; |
| 132 base::Time end_time_; | 132 base::Time end_time_; |
| 133 DownloadState download_state_; | 133 DownloadState download_state_; |
| 134 std::string mime_type_; | 134 std::string mime_type_; |
| 135 GURL original_url_; | 135 GURL original_url_; |
| 136 | 136 |
| 137 // The members below are to be returned by methods, which return by reference. | 137 // The members below are to be returned by methods, which return by reference. |
| 138 std::string dummy_string; | 138 std::string dummy_string; |
| 139 std::vector<GURL> dummy_url_vector; | 139 std::vector<GURL> dummy_url_vector; |
| 140 GURL dummy_url; | 140 GURL dummy_url; |
| 141 base::FilePath dummy_file_path; | 141 base::FilePath dummy_file_path; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem); | 143 DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace test | 146 } // namespace test |
| 147 | 147 |
| 148 #endif // CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ | 148 #endif // CHROME_BROWSER_NTP_SNIPPETS_FAKE_DOWNLOAD_ITEM_H_ |
| OLD | NEW |