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

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

Issue 2507793002: [NTP] Propagate OfflineId from C++ for Downloads. (Closed)
Patch Set: rebase. Created 4 years, 1 month 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 #include "components/ntp_snippets/content_suggestion.h" 5 #include "components/ntp_snippets/content_suggestion.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace ntp_snippets { 9 namespace ntp_snippets {
10 10
11 DownloadSuggestionExtra::DownloadSuggestionExtra() = default;
12
13 DownloadSuggestionExtra::~DownloadSuggestionExtra() = default;
14
11 bool ContentSuggestion::ID::operator==(const ID& rhs) const { 15 bool ContentSuggestion::ID::operator==(const ID& rhs) const {
12 return category_ == rhs.category_ && 16 return category_ == rhs.category_ &&
13 id_within_category_ == rhs.id_within_category_; 17 id_within_category_ == rhs.id_within_category_;
14 } 18 }
15 19
16 bool ContentSuggestion::ID::operator!=(const ID& rhs) const { 20 bool ContentSuggestion::ID::operator!=(const ID& rhs) const {
17 return !(*this == rhs); 21 return !(*this == rhs);
18 } 22 }
19 23
20 ContentSuggestion::ContentSuggestion(const ID& id, const GURL& url) 24 ContentSuggestion::ContentSuggestion(const ID& id, const GURL& url)
(...skipping 21 matching lines...) Expand all
42 download_suggestion_extra_ = std::move(download_suggestion_extra); 46 download_suggestion_extra_ = std::move(download_suggestion_extra);
43 } 47 }
44 48
45 void ContentSuggestion::set_recent_tab_suggestion_extra( 49 void ContentSuggestion::set_recent_tab_suggestion_extra(
46 std::unique_ptr<RecentTabSuggestionExtra> recent_tab_suggestion_extra) { 50 std::unique_ptr<RecentTabSuggestionExtra> recent_tab_suggestion_extra) {
47 DCHECK(id_.category().IsKnownCategory(KnownCategories::RECENT_TABS)); 51 DCHECK(id_.category().IsKnownCategory(KnownCategories::RECENT_TABS));
48 recent_tab_suggestion_extra_ = std::move(recent_tab_suggestion_extra); 52 recent_tab_suggestion_extra_ = std::move(recent_tab_suggestion_extra);
49 } 53 }
50 54
51 } // namespace ntp_snippets 55 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « components/ntp_snippets/content_suggestion.h ('k') | components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698