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

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: comments 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>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "components/ntp_snippets/content_suggestion_category.h" 14 #include "components/ntp_snippets/content_suggestion_category.h"
15 #include "components/ntp_snippets/content_suggestions_provider_type.h" 15 #include "components/ntp_snippets/content_suggestions_provider_type.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace ntp_snippets { 18 namespace ntp_snippets {
19 19
20 // A content suggestion for the new tab page, which can be an article or an 20 // A content suggestion for the new tab page, which can be an article or an
21 // offline page, for example. 21 // offline page, for example.
22 // NOTE: This class is not yet in use, please use NTPSnippet for now 22 // NOTE: This class is not yet in use, please use NTPSnippet for now
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 ContentSuggestion(ContentSuggestion&&);
31 ContentSuggestion& operator=(ContentSuggestion&&);
30 32
31 ~ContentSuggestion(); 33 ~ContentSuggestion();
32 34
33 // An ID for identifying the suggestion. The ID is unique among all 35 // An ID for identifying the suggestion. The ID is unique among all
34 // suggestions from the same provider, so to determine a globally unique 36 // suggestions from the same provider, so to determine a globally unique
35 // identifier, combine this ID with the provider type. 37 // identifier, combine this ID with the provider type.
36 const std::string& id() const { return id_; } 38 const std::string& id() const { return id_; }
37 39
38 // The provider that created this suggestion. 40 // The provider that created this suggestion.
39 ContentSuggestionsProviderType provider() const { return provider_; } 41 ContentSuggestionsProviderType provider() const { return provider_; }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 base::Time publish_date_; 94 base::Time publish_date_;
93 std::string publisher_name_; 95 std::string publisher_name_;
94 float score_; 96 float score_;
95 97
96 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); 98 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion);
97 }; 99 };
98 100
99 } // namespace ntp_snippets 101 } // namespace ntp_snippets
100 102
101 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ 103 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698