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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 12 matching lines...) Expand all Loading... | |
23 // (see ntp_snippet.h). | 23 // (see ntp_snippet.h). |
24 class ContentSuggestion { | 24 class ContentSuggestion { |
25 public: | 25 public: |
26 ContentSuggestion(const std::string& id, | 26 ContentSuggestion(const std::string& id, |
27 const ContentSuggestionsProviderType provider, | 27 const ContentSuggestionsProviderType provider, |
28 const ContentSuggestionCategory category, | 28 const ContentSuggestionCategory category, |
29 const GURL& url); | 29 const GURL& url); |
30 | 30 |
31 ~ContentSuggestion(); | 31 ~ContentSuggestion(); |
32 | 32 |
33 ContentSuggestion(ContentSuggestion&&); | |
Marc Treib
2016/06/28 11:29:08
nit: I'd move this up, just under the other ctor.
Philipp Keck
2016/06/28 12:04:08
Done, I moved up both the move-constructor and the
| |
34 ContentSuggestion& operator=(ContentSuggestion&&); | |
35 | |
33 // An ID for identifying the suggestion. The ID is unique among all | 36 // An ID for identifying the suggestion. The ID is unique among all |
34 // suggestions from the same provider, so to determine a globally unique | 37 // suggestions from the same provider, so to determine a globally unique |
35 // identifier, combine this ID with the provider type. | 38 // identifier, combine this ID with the provider type. |
36 const std::string& id() const { return id_; } | 39 const std::string& id() const { return id_; } |
37 | 40 |
38 // The provider that created this suggestion. | 41 // The provider that created this suggestion. |
39 ContentSuggestionsProviderType provider() const { return provider_; } | 42 ContentSuggestionsProviderType provider() const { return provider_; } |
40 | 43 |
41 // The category that this suggestion belongs to. | 44 // The category that this suggestion belongs to. |
42 ContentSuggestionCategory category() const { return category_; } | 45 ContentSuggestionCategory category() const { return category_; } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 base::Time publish_date_; | 95 base::Time publish_date_; |
93 std::string publisher_name_; | 96 std::string publisher_name_; |
94 float score_; | 97 float score_; |
95 | 98 |
96 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); | 99 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); |
97 }; | 100 }; |
98 | 101 |
99 } // namespace ntp_snippets | 102 } // namespace ntp_snippets |
100 | 103 |
101 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ | 104 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ |
OLD | NEW |