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

Unified Diff: components/ntp_snippets/ntp_snippet.h

Issue 2059203002: Add ContentSuggestion, ContentSuggestionCategory and ContentSuggestionProviderType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/ntp_snippet.h
diff --git a/components/ntp_snippets/ntp_snippet.h b/components/ntp_snippets/ntp_snippet.h
index 745c246e9d619f3c6c390da482d41d776d5dbf3e..4d6908e6b82f6fff94bb92a4e384f1843f6c5f7b 100644
--- a/components/ntp_snippets/ntp_snippet.h
+++ b/components/ntp_snippets/ntp_snippet.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/time/time.h"
+#include "components/ntp_snippets/snippet.h"
#include "url/gurl.h"
namespace base {
@@ -32,6 +33,11 @@ struct SnippetSource {
GURL amp_url;
};
+// TODO IMPORTANT NOTE: This class will move to a sub-namespace and be renamed
Marc Treib 2016/06/13 13:08:17 TODOs should always have someone assigned, as in:
Philipp Keck 2016/06/13 14:13:14 Done.
Philipp Keck 2016/06/13 14:13:14 Ok. I don't need the TODO comment for myself becau
+// ArticleSnippet. It will only be used for snippets from Chrome Reader.
+// When accessing snippets for all usages towards the UI, use the new "Snippet"
+// class through the "SnippetService" instead.
+
class NTPSnippet {
public:
using PtrVector = std::vector<std::unique_ptr<NTPSnippet>>;
@@ -125,6 +131,11 @@ class NTPSnippet {
bool is_discarded() const { return is_discarded_; }
void set_discarded(bool discarded) { is_discarded_ = discarded; }
+ // TODO IMPORTANT NOTE This method is confusingly named because of upcoming
+ // changes to the names: NTPSnippet will become ArticleSnippet.
+ // TODO (pke) Instead of converting, ArticleSnippet might inherit Snippet?
Marc Treib 2016/06/13 13:08:17 Probably not :) But anyway, this is the kind of t
Philipp Keck 2016/06/13 14:13:14 Done.
+ std::unique_ptr<Snippet> ToSnippet() const;
+
// Public for testing.
static base::Time TimeFromJsonString(const std::string& timestamp_str);
static std::string TimeToJsonString(const base::Time& time);

Powered by Google App Engine
This is Rietveld 408576698