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

Unified Diff: chrome/browser/android/ntp/ntp_snippets_bridge.cc

Issue 2244793002: Remove deleted offline page suggestions from opened NTPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust MockContentSuggestionsProvider Created 4 years, 4 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: chrome/browser/android/ntp/ntp_snippets_bridge.cc
diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
index 03e5c0ad7e27ea6d4fcf58ce6a4e5599949a6925..e4e6aae1abde2f1cb272d32dd12be96c08eab9c8 100644
--- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc
+++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
@@ -228,6 +228,18 @@ void NTPSnippetsBridge::OnCategoryStatusChanged(Category category,
static_cast<int>(new_status));
}
+void NTPSnippetsBridge::OnSuggestionInvalidated(
+ Category category,
+ const std::string& suggestion_id) {
+ if (observer_.is_null())
+ return;
+
+ JNIEnv* env = base::android::AttachCurrentThread();
+ Java_SnippetsBridge_onSuggestionInvalidated(
+ env, observer_.obj(), static_cast<int>(category.id()),
+ ConvertUTF8ToJavaString(env, suggestion_id).obj());
+}
+
void NTPSnippetsBridge::ContentSuggestionsServiceShutdown() {
observer_.Reset();
content_suggestions_service_observer_.Remove(content_suggestions_service_);
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.h ('k') | chrome/browser/ui/webui/snippets_internals_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698