Index: components/ntp_snippets/ntp_snippets_service.cc |
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc |
index 1bb40f4ddc8c77e9919548ea6352b347552144cc..012ca76680e848e49a3ebff5a6fb145d99ce4075 100644 |
--- a/components/ntp_snippets/ntp_snippets_service.cc |
+++ b/components/ntp_snippets/ntp_snippets_service.cc |
@@ -188,8 +188,7 @@ NTPSnippetsService::NTPSnippetsService( |
base::Unretained(this))); |
} |
-NTPSnippetsService::~NTPSnippetsService() { |
-} |
+NTPSnippetsService::~NTPSnippetsService() = default; |
// static |
void NTPSnippetsService::RegisterProfilePrefs(PrefRegistrySimple* registry) { |
@@ -482,7 +481,7 @@ void NTPSnippetsService::OnSuggestionsChanged( |
// for its callback. |
NotifyNewSuggestions(); |
- FetchSnippetsFromHosts(hosts, /*force_request=*/false); |
+ FetchSnippetsFromHosts(hosts, /*interactive_request=*/false); |
} |
void NTPSnippetsService::OnFetchFinished( |
@@ -751,9 +750,8 @@ void NTPSnippetsService::OnSnippetImageFetchedFromDatabase( |
// |image_decoder_| is null in tests. |
if (image_decoder_ && !data.empty()) { |
image_decoder_->DecodeImage( |
- std::move(data), |
- base::Bind(&NTPSnippetsService::OnSnippetImageDecodedFromDatabase, |
- base::Unretained(this), callback, suggestion_id)); |
+ data, base::Bind(&NTPSnippetsService::OnSnippetImageDecodedFromDatabase, |
sfiera
2016/09/23 16:51:04
Because DecodeImage takes a const std::string&, so
Marc Treib
2016/09/23 16:53:06
Good point, I could have mentioned that one :)
|
+ base::Unretained(this), callback, suggestion_id)); |
return; |
} |
@@ -806,7 +804,7 @@ void NTPSnippetsService::FetchSnippetImageFromNetwork( |
return; |
} |
- const NTPSnippet& snippet = *it->get(); |
+ const NTPSnippet& snippet = **it; |
// TODO(jkrcal): We probably should rename OnImageDataFetched() to |
// CacheImageData(). This would document that this is actually independent |
@@ -840,7 +838,7 @@ void NTPSnippetsService::EnterStateReady() { |
// Either add a DCHECK here that we actually are allowed to do network I/O |
// or change the logic so that some explicit call is always needed for the |
// network request. |
- FetchSnippets(/*force_request=*/false); |
+ FetchSnippets(/*interactive_request=*/false); |
fetch_when_ready_ = false; |
} |