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

Unified Diff: jingle/notifier/listener/fake_push_client_observer.cc

Issue 10413014: [Sync] Turn notifier::PushClient into an interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 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: jingle/notifier/listener/fake_push_client_observer.cc
diff --git a/jingle/notifier/listener/fake_push_client_observer.cc b/jingle/notifier/listener/fake_push_client_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ec1b9e1118802faeacefdb6abb4f1bbe63044129
--- /dev/null
+++ b/jingle/notifier/listener/fake_push_client_observer.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 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.
+
+#include "jingle/notifier/listener/fake_push_client_observer.h"
+
+namespace notifier {
+
+FakePushClientObserver::FakePushClientObserver()
+ : notifications_enabled_(false) {}
+
+FakePushClientObserver::~FakePushClientObserver() {}
+
+void FakePushClientObserver::OnNotificationStateChange(
+ bool notifications_enabled) {
+ notifications_enabled_ = notifications_enabled;
+}
+
+void FakePushClientObserver::OnIncomingNotification(
+ const Notification& notification) {
+ last_incoming_notification_ = notification;
+}
+
+bool FakePushClientObserver::notifications_enabled() const {
+ return notifications_enabled_;
+}
+
+const Notification&
+FakePushClientObserver::last_incoming_notification() const {
+ return last_incoming_notification_;
+}
+
+} // namespace notifier
+
« no previous file with comments | « jingle/notifier/listener/fake_push_client_observer.h ('k') | jingle/notifier/listener/non_blocking_push_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698