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

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

Issue 10398051: [Sync] Replace TalkMediator*/MediatorThread* with PushClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix test 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/mediator_thread_mock.cc
diff --git a/jingle/notifier/listener/mediator_thread_mock.cc b/jingle/notifier/listener/mediator_thread_mock.cc
deleted file mode 100644
index 980f81a2079a29b1b57b691d2801e659d8fdad94..0000000000000000000000000000000000000000
--- a/jingle/notifier/listener/mediator_thread_mock.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2011 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/mediator_thread_mock.h"
-
-#include "talk/xmpp/xmppclientsettings.h"
-
-namespace notifier {
-
-MockMediatorThread::MockMediatorThread() : observer_(NULL) {
- Reset();
-}
-
-MockMediatorThread::~MockMediatorThread() {}
-
-void MockMediatorThread::Reset() {
- login_calls = 0;
- logout_calls = 0;
- start_calls = 0;
- subscribe_calls = 0;
- listen_calls = 0;
- send_calls = 0;
- update_settings_calls = 0;
-}
-
-void MockMediatorThread::AddObserver(Observer* observer) {
- observer_ = observer;
-}
-
-void MockMediatorThread::RemoveObserver(Observer* observer) {
- observer_ = NULL;
-}
-
-// Overridden from MediatorThread
-void MockMediatorThread::Login(const buzz::XmppClientSettings& settings) {
- login_calls++;
- if (observer_) {
- observer_->OnConnectionStateChange(true);
- }
-}
-
-void MockMediatorThread::Logout() {
- logout_calls++;
- if (observer_) {
- observer_->OnConnectionStateChange(false);
- }
-}
-
-void MockMediatorThread::Start() {
- start_calls++;
-}
-
-void MockMediatorThread::SubscribeForUpdates(
- const SubscriptionList& subscriptions) {
- subscribe_calls++;
- if (observer_) {
- observer_->OnSubscriptionStateChange(true);
- }
-}
-
-void MockMediatorThread::ListenForUpdates() {
- listen_calls++;
-}
-
-void MockMediatorThread::SendNotification(const Notification &) {
- send_calls++;
- if (observer_) {
- observer_->OnOutgoingNotification();
- }
-}
-
-void MockMediatorThread::ReceiveNotification(
- const Notification& data) {
- if (observer_) {
- observer_->OnIncomingNotification(data);
- }
-}
-
-void MockMediatorThread::UpdateXmppSettings(
- const buzz::XmppClientSettings& settings) {
- update_settings_calls++;
-}
-
-} // namespace notifier
« no previous file with comments | « jingle/notifier/listener/mediator_thread_mock.h ('k') | jingle/notifier/listener/mediator_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698