| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 Category category_; | 37 Category category_; |
| 38 std::string id_within_category_; | 38 std::string id_within_category_; |
| 39 | 39 |
| 40 // Allow copy and assignment. | 40 // Allow copy and assignment. |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // Creates a new ContentSuggestion. The caller must ensure that the |id| | 43 // Creates a new ContentSuggestion. The caller must ensure that the |id| |
| 44 // passed in here is unique application-wide. | 44 // passed in here is unique application-wide. |
| 45 ContentSuggestion(ID id, const GURL& url); | 45 ContentSuggestion(const ID& id, const GURL& url); |
| 46 ContentSuggestion(Category category, | 46 ContentSuggestion(Category category, |
| 47 const std::string& id_within_category, | 47 const std::string& id_within_category, |
| 48 const GURL& url); | 48 const GURL& url); |
| 49 ContentSuggestion(ContentSuggestion&&); | 49 ContentSuggestion(ContentSuggestion&&); |
| 50 ContentSuggestion& operator=(ContentSuggestion&&); | 50 ContentSuggestion& operator=(ContentSuggestion&&); |
| 51 | 51 |
| 52 ~ContentSuggestion(); | 52 ~ContentSuggestion(); |
| 53 | 53 |
| 54 // An ID for identifying the suggestion. The ID is unique application-wide. | 54 // An ID for identifying the suggestion. The ID is unique application-wide. |
| 55 const ID& id() const { return id_; } | 55 const ID& id() const { return id_; } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 GURL amp_url_; | 99 GURL amp_url_; |
| 100 base::string16 title_; | 100 base::string16 title_; |
| 101 base::string16 snippet_text_; | 101 base::string16 snippet_text_; |
| 102 base::Time publish_date_; | 102 base::Time publish_date_; |
| 103 base::string16 publisher_name_; | 103 base::string16 publisher_name_; |
| 104 float score_; | 104 float score_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); | 106 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 std::ostream& operator<<(std::ostream& os, ContentSuggestion::ID id); | 109 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id); |
| 110 | 110 |
| 111 } // namespace ntp_snippets | 111 } // namespace ntp_snippets |
| 112 | 112 |
| 113 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ | 113 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ |
| OLD | NEW |