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

Unified Diff: chrome/browser/android/ntp/content_suggestions_notifier_service.h

Issue 2606753002: Post notification after fetching articles (Closed)
Patch Set: Add TODO. Created 3 years, 11 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/content_suggestions_notifier_service.h
diff --git a/chrome/browser/android/ntp/content_suggestions_notifier_service.h b/chrome/browser/android/ntp/content_suggestions_notifier_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..fcc4d76b4b206aaab029b3610d48a4863ea44e6f
--- /dev/null
+++ b/chrome/browser/android/ntp/content_suggestions_notifier_service.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFIER_SERVICE_H_
+#define CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFIER_SERVICE_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "components/keyed_service/core/keyed_service.h"
+
+class PrefService;
+class Profile;
+
+namespace ntp_snippets {
+class ContentSuggestionsService;
+} // namespace ntp_snippets
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+} // namespace user_prefs
+
+class ContentSuggestionsNotifierService : public KeyedService {
+ public:
+ ContentSuggestionsNotifierService(
+ Profile* profile,
+ ntp_snippets::ContentSuggestionsService* suggestions,
+ PrefService* prefs);
+
+ ~ContentSuggestionsNotifierService() override;
+
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
+ private:
+ class NotifyingObserver;
+ std::unique_ptr<NotifyingObserver> observer_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSuggestionsNotifierService);
+};
+
+#endif // CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFIER_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698