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..42865952265c124885d3e1290388a1ef6a5a0959 100644 |
| --- a/components/ntp_snippets/content_suggestion.h |
| +++ b/components/ntp_snippets/content_suggestion.h |
| @@ -11,8 +11,6 @@ |
| #include "base/macros.h" |
| #include "base/time/time.h" |
| -#include "components/ntp_snippets/content_suggestion_category.h" |
| -#include "components/ntp_snippets/content_suggestions_provider_type.h" |
| #include "url/gurl.h" |
| namespace ntp_snippets { |
| @@ -23,24 +21,21 @@ namespace ntp_snippets { |
| // (see ntp_snippet.h). |
| class ContentSuggestion { |
| public: |
| + // This is the constructor that should be used by providers. |
| + // The caller must ensure that the |id| passed in here is unique |
| + // application-wide. Note: The provider should use its ::MakeUniqueID() |
|
tschumann
2016/07/06 06:36:12
i'd drop the Note:.
That might be something to add
Philipp Keck
2016/07/06 08:34:23
Done.
|
| + // function to create the ID. |
| ContentSuggestion(const std::string& id, |
| - const ContentSuggestionsProviderType provider, |
| - 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. |
|
tschumann
2016/07/06 06:36:12
i wouldn't mention providers at all in this class.
Philipp Keck
2016/07/06 08:34:23
Done.
|
| 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_; } |
| - |
| // The normal content URL where the content referenced by the suggestion can |
| // be accessed. |
| const GURL& url() const { return url_; } |
| @@ -82,8 +77,6 @@ class ContentSuggestion { |
| private: |
| std::string id_; |
| - ContentSuggestionsProviderType provider_; |
| - ContentSuggestionCategory category_; |
| GURL url_; |
| GURL amp_url_; |
| std::string title_; |