Index: components/ntp_snippets/breaking_news/content_suggestions_gcm_app_handler.cc |
diff --git a/components/ntp_snippets/breaking_news/content_suggestions_gcm_app_handler.cc b/components/ntp_snippets/breaking_news/content_suggestions_gcm_app_handler.cc |
index 9e40a220bbae41106f3304591970ba1c278e4733..73531a051e3527025bb156e15cd762282b3fcd0c 100644 |
--- a/components/ntp_snippets/breaking_news/content_suggestions_gcm_app_handler.cc |
+++ b/components/ntp_snippets/breaking_news/content_suggestions_gcm_app_handler.cc |
@@ -47,12 +47,14 @@ ContentSuggestionsGCMAppHandler::~ContentSuggestionsGCMAppHandler() { |
} |
} |
-void ContentSuggestionsGCMAppHandler::StartListening() { |
+void ContentSuggestionsGCMAppHandler::StartListening( |
+ OnNewContentCallback on_new_content_callback) { |
#if !defined(OS_ANDROID) |
NOTREACHED() |
<< "The ContentSuggestionsGCMAppHandler should only be used on Android."; |
#endif |
Subscribe(); |
+ on_new_content_callback_ = std::move(on_new_content_callback); |
gcm_driver_->AddAppHandler(kContentSuggestionsGCMAppID, this); |
} |
@@ -112,7 +114,8 @@ void ContentSuggestionsGCMAppHandler::OnStoreReset() { |
void ContentSuggestionsGCMAppHandler::OnMessage( |
const std::string& app_id, |
const gcm::IncomingMessage& message) { |
- // TODO(mamir): Implement Show notification and update the feed. |
+ // TODO(mamir): Build the message. |
+ on_new_content_callback_.Run(std::string()); |
} |
void ContentSuggestionsGCMAppHandler::OnMessagesDeleted( |