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

Unified Diff: components/ntp_snippets/breaking_news/breaking_news_subscription_manager.h

Issue 2914263002: [NTP::Push] Adding Breaking News Subscription Manager (Closed)
Patch Set: Created 3 years, 7 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: components/ntp_snippets/breaking_news/breaking_news_subscription_manager.h
diff --git a/components/ntp_snippets/breaking_news/breaking_news_subscription_manager.h b/components/ntp_snippets/breaking_news/breaking_news_subscription_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..f0f5cb4848d48cf00e4b1287f167f60c6f78c9c0
--- /dev/null
+++ b/components/ntp_snippets/breaking_news/breaking_news_subscription_manager.h
@@ -0,0 +1,30 @@
+// Copyright 2017 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 COMPONENTS_NTP_SNIPPETS_REMOTE_BREAKING_NEWS_SUBSCRIPTION_MANAGER_H_
+#define COMPONENTS_NTP_SNIPPETS_REMOTE_BREAKING_NEWS_SUBSCRIPTION_MANAGER_H_
+
+#include "components/ntp_snippets/breaking_news/subscription_json_request.h"
+#include "net/url_request/url_request_context_getter.h"
+#include "url/gurl.h"
+
+namespace ntp_snippets {
+class BreakingNewsSubscriptionManager {
+ private:
fhorschig 2017/06/02 09:11:50 Please put private declarations below public ones.
mamir 2017/06/04 10:17:03 Done.
+ // Holds the URL request context.
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
+
+ // API endpoint for subscribing.
+ const GURL subscribe_url_;
+
+ public:
+ BreakingNewsSubscriptionManager(
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);
+ void Subscribe(const std::string& token);
+ void Unsubscribe(const std::string& token);
+ void SubscribeDone(std::unique_ptr<internal::SubscriptionJsonRequest> request,
fhorschig 2017/06/02 09:11:50 I am pretty sure, this is going to be an implement
mamir 2017/06/04 10:17:03 Done.
+ const ntp_snippets::Status& status);
+};
+}
+#endif // COMPONENTS_NTP_SNIPPETS_REMOTE_BREAKING_NEWS_SUBSCRIPTION_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698