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

Side by Side Diff: components/ntp_snippets/content_suggestion.h

Issue 2102023002: Add ContentSuggestionsService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698