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 COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "components/ntp_snippets/category.h" | 15 #include "components/ntp_snippets/category.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace ntp_snippets { | 18 namespace ntp_snippets { |
19 | 19 |
20 // DownloadSuggestionExtra contains additional data which is only available for | 20 // DownloadSuggestionExtra contains additional data which is only available for |
21 // download suggestions. | 21 // download suggestions. |
22 struct DownloadSuggestionExtra { | 22 struct DownloadSuggestionExtra { |
23 DownloadSuggestionExtra(); | 23 DownloadSuggestionExtra(); |
| 24 DownloadSuggestionExtra(const DownloadSuggestionExtra&); |
24 ~DownloadSuggestionExtra(); | 25 ~DownloadSuggestionExtra(); |
25 | 26 |
| 27 // The GUID for the downloaded file. |
| 28 std::string download_guid; |
26 // The file path of the downloaded file once download completes. | 29 // The file path of the downloaded file once download completes. |
27 base::FilePath target_file_path; | 30 base::FilePath target_file_path; |
28 // The effective MIME type of downloaded content. | 31 // The effective MIME type of downloaded content. |
29 std::string mime_type; | 32 std::string mime_type; |
30 // Underlying offline page identifier. | 33 // Underlying offline page identifier. |
31 int64_t offline_page_id = 0; | 34 int64_t offline_page_id = 0; |
32 // Whether or not the download suggestion is a downloaded asset. | 35 // Whether or not the download suggestion is a downloaded asset. |
33 // When this is true, |offline_page_id| is ignored, otherwise | 36 // When this is true, |offline_page_id| is ignored, otherwise |
34 // |target_file_path| and |mime_type| are ignored. | 37 // |target_file_path| and |mime_type| are ignored. |
35 bool is_download_asset = false; | 38 bool is_download_asset = false; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 base::Time fetch_date_; | 177 base::Time fetch_date_; |
175 | 178 |
176 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); | 179 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); |
177 }; | 180 }; |
178 | 181 |
179 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id); | 182 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id); |
180 | 183 |
181 } // namespace ntp_snippets | 184 } // namespace ntp_snippets |
182 | 185 |
183 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ | 186 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ |
OLD | NEW |