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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 1869023002: [NTP Snippets] SnippetsBridge: register as SnippetsObserver only when we get a Java observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippets_service_cleanup
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5f6fa58f5c9ad89063ed08875224c7ddc6f6360f..310cacd133a82835d3cee9a087420b1a59b6de4d 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -173,7 +173,7 @@ void NTPSnippetsService::Init(bool enabled) {
void NTPSnippetsService::Shutdown() {
FOR_EACH_OBSERVER(NTPSnippetsServiceObserver, observers_,
- NTPSnippetsServiceShutdown(this));
+ NTPSnippetsServiceShutdown());
}
void NTPSnippetsService::FetchSnippets() {
@@ -201,7 +201,7 @@ bool NTPSnippetsService::DiscardSnippet(const GURL& url) {
void NTPSnippetsService::AddObserver(NTPSnippetsServiceObserver* observer) {
observers_.AddObserver(observer);
- observer->NTPSnippetsServiceLoaded(this);
+ observer->NTPSnippetsServiceLoaded();
}
void NTPSnippetsService::RemoveObserver(NTPSnippetsServiceObserver* observer) {
@@ -224,7 +224,7 @@ void NTPSnippetsService::OnSuggestionsChanged(
StoreSnippetsToPrefs();
FOR_EACH_OBSERVER(NTPSnippetsServiceObserver, observers_,
- NTPSnippetsServiceLoaded(this));
+ NTPSnippetsServiceLoaded());
FetchSnippetsImpl(hosts);
}
@@ -360,7 +360,7 @@ void NTPSnippetsService::RemoveExpiredSnippets() {
StoreDiscardedSnippetsToPrefs();
FOR_EACH_OBSERVER(NTPSnippetsServiceObserver, observers_,
- NTPSnippetsServiceLoaded(this));
+ NTPSnippetsServiceLoaded());
// If there are any snippets left, schedule a timer for the next expiry.
if (snippets_.empty() && discarded_snippets_.empty())
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698