Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Side by Side Diff: components/ntp_snippets/content_suggestion.h

Issue 2507793002: [NTP] Propagate OfflineId from C++ for Downloads. (Closed)
Patch Set: removed TODO. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // The file path of the downloaded file once download completes. 23 // The file path of the downloaded file once download completes.
24 base::FilePath target_file_path; 24 base::FilePath target_file_path;
25 // The effective MIME type of downloaded content. 25 // The effective MIME type of downloaded content.
26 std::string mime_type; 26 std::string mime_type;
27 // Underlying offline page identifier.
28 std::string offline_page_id;
27 // Whether or not the download suggestion is a downloaded asset. 29 // Whether or not the download suggestion is a downloaded asset.
28 bool is_download_asset = false; 30 bool is_download_asset = false;
Marc Treib 2016/11/16 15:22:58 Hm, this is now a bit messy... if is_download_asse
vitaliii 2016/11/16 15:45:08 It is other way around. When is_download_asset is
29 }; 31 };
30 32
31 // Contains additional data which is only available for recent tab suggestions. 33 // Contains additional data which is only available for recent tab suggestions.
32 struct RecentTabSuggestionExtra { 34 struct RecentTabSuggestionExtra {
33 // Corresponding tab identifier. 35 // Corresponding tab identifier.
34 std::string tab_id; 36 std::string tab_id;
35 // Underlying offline page identifier. 37 // Underlying offline page identifier.
36 std::string offline_page_id; 38 std::string offline_page_id;
37 }; 39 };
38 40
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 std::unique_ptr<RecentTabSuggestionExtra> recent_tab_suggestion_extra_; 146 std::unique_ptr<RecentTabSuggestionExtra> recent_tab_suggestion_extra_;
145 147
146 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); 148 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion);
147 }; 149 };
148 150
149 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id); 151 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id);
150 152
151 } // namespace ntp_snippets 153 } // namespace ntp_snippets
152 154
153 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ 155 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698