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

Unified Diff: components/ntp_snippets/ntp_snippet.cc

Issue 2368583002: [NTP Snippets] Cleanups from clang-tidy (Closed)
Patch Set: rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/ntp_snippet.cc
diff --git a/components/ntp_snippets/ntp_snippet.cc b/components/ntp_snippets/ntp_snippet.cc
index d69a77ab84b090a752d9641ecbb53e3883306c83..57f9526d271306d103164cdda04ef76baeba8289 100644
--- a/components/ntp_snippets/ntp_snippet.cc
+++ b/components/ntp_snippets/ntp_snippet.cc
@@ -41,7 +41,7 @@ namespace ntp_snippets {
NTPSnippet::NTPSnippet(const std::string& id)
: id_(id), score_(0), is_dismissed_(false), best_source_index_(0) {}
-NTPSnippet::~NTPSnippet() {}
+NTPSnippet::~NTPSnippet() = default;
// static
std::unique_ptr<NTPSnippet> NTPSnippet::CreateFromChromeReaderDictionary(
@@ -194,7 +194,6 @@ std::unique_ptr<NTPSnippet> NTPSnippet::CreateFromProto(
DLOG(WARNING) << "Invalid article url " << source_proto.url();
continue;
}
- std::string publisher_name = source_proto.publisher_name();
GURL amp_url;
if (source_proto.has_amp_url()) {
amp_url = GURL(source_proto.amp_url());
@@ -202,7 +201,8 @@ std::unique_ptr<NTPSnippet> NTPSnippet::CreateFromProto(
<< source_proto.amp_url();
}
- snippet->add_source(SnippetSource(url, publisher_name, amp_url));
+ snippet->add_source(
+ SnippetSource(url, source_proto.publisher_name(), amp_url));
}
if (snippet->sources_.empty()) {

Powered by Google App Engine
This is Rietveld 408576698