Chromium Code Reviews| Index: components/ntp_snippets/content_suggestion.h |
| diff --git a/components/ntp_snippets/content_suggestion.h b/components/ntp_snippets/content_suggestion.h |
| index 60ab27285d39153f84cbc3440fa5346646f6a7d5..d7ab4293153e001955efa5c107e5df023a5ddbfb 100644 |
| --- a/components/ntp_snippets/content_suggestion.h |
| +++ b/components/ntp_snippets/content_suggestion.h |
| @@ -23,21 +23,23 @@ namespace ntp_snippets { |
| // (see ntp_snippet.h). |
| class ContentSuggestion { |
| public: |
| - ContentSuggestion(const std::string& id, |
| - const ContentSuggestionsProviderType provider, |
| + // This is the constructor that should be used by providers. |
| + // Note that the |original_id| provided here is different from the ID that is |
| + // returned from |id()| because it will be combined with the |provider_type| |
| + // to obtain an ID that is unique application-wide. |
| + ContentSuggestion(const std::string& original_id, |
| + const ContentSuggestionsProviderType provider_type, |
|
tschumann
2016/07/01 09:37:10
IMO the suggestion constructor should only get a s
Philipp Keck
2016/07/01 13:00:04
I can't think of any good solution in which this c
Marc Treib
2016/07/01 13:29:17
For "Articles for you", the mixing will happen on
Philipp Keck
2016/07/01 13:45:11
Acknowledged.
|
| const ContentSuggestionCategory category, |
| const GURL& url); |
| + ContentSuggestion(ContentSuggestion&&); |
| + ContentSuggestion& operator=(ContentSuggestion&&); |
| ~ContentSuggestion(); |
| // An ID for identifying the suggestion. The ID is unique among all |
| - // suggestions from the same provider, so to determine a globally unique |
| - // identifier, combine this ID with the provider type. |
| + // suggestions of all providers. |
| const std::string& id() const { return id_; } |
| - // The provider that created this suggestion. |
| - ContentSuggestionsProviderType provider() const { return provider_; } |
| - |
| // The category that this suggestion belongs to. |
| ContentSuggestionCategory category() const { return category_; } |
| @@ -82,7 +84,6 @@ class ContentSuggestion { |
| private: |
| std::string id_; |
| - ContentSuggestionsProviderType provider_; |
| ContentSuggestionCategory category_; |
| GURL url_; |
| GURL amp_url_; |