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 #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; | 11 DownloadSuggestionExtra::DownloadSuggestionExtra() = default; |
12 | 12 |
| 13 DownloadSuggestionExtra::DownloadSuggestionExtra( |
| 14 const DownloadSuggestionExtra& other) = default; |
| 15 |
13 DownloadSuggestionExtra::~DownloadSuggestionExtra() = default; | 16 DownloadSuggestionExtra::~DownloadSuggestionExtra() = default; |
14 | 17 |
15 bool ContentSuggestion::ID::operator==(const ID& rhs) const { | 18 bool ContentSuggestion::ID::operator==(const ID& rhs) const { |
16 return category_ == rhs.category_ && | 19 return category_ == rhs.category_ && |
17 id_within_category_ == rhs.id_within_category_; | 20 id_within_category_ == rhs.id_within_category_; |
18 } | 21 } |
19 | 22 |
20 bool ContentSuggestion::ID::operator!=(const ID& rhs) const { | 23 bool ContentSuggestion::ID::operator!=(const ID& rhs) const { |
21 return !(*this == rhs); | 24 return !(*this == rhs); |
22 } | 25 } |
(...skipping 28 matching lines...) Expand all Loading... |
51 DCHECK(id_.category().IsKnownCategory(KnownCategories::RECENT_TABS)); | 54 DCHECK(id_.category().IsKnownCategory(KnownCategories::RECENT_TABS)); |
52 recent_tab_suggestion_extra_ = std::move(recent_tab_suggestion_extra); | 55 recent_tab_suggestion_extra_ = std::move(recent_tab_suggestion_extra); |
53 } | 56 } |
54 | 57 |
55 void ContentSuggestion::set_notification_extra( | 58 void ContentSuggestion::set_notification_extra( |
56 std::unique_ptr<NotificationExtra> notification_extra) { | 59 std::unique_ptr<NotificationExtra> notification_extra) { |
57 notification_extra_ = std::move(notification_extra); | 60 notification_extra_ = std::move(notification_extra); |
58 } | 61 } |
59 | 62 |
60 } // namespace ntp_snippets | 63 } // namespace ntp_snippets |
OLD | NEW |