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

Unified Diff: remoting/jingle_glue/fake_signal_strategy.h

Issue 390983003: Remove remoting/jingle_glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: remoting/jingle_glue/fake_signal_strategy.h
diff --git a/remoting/jingle_glue/fake_signal_strategy.h b/remoting/jingle_glue/fake_signal_strategy.h
deleted file mode 100644
index 9dc25cfcff008ecb6d99a3227a9f7f603b86e52a..0000000000000000000000000000000000000000
--- a/remoting/jingle_glue/fake_signal_strategy.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.
-
-#ifndef REMOTING_JINGLE_GLUE_FAKE_SIGNAL_STRATEGY_H_
-#define REMOTING_JINGLE_GLUE_FAKE_SIGNAL_STRATEGY_H_
-
-#include <list>
-#include <queue>
-#include <string>
-
-#include "base/observer_list.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/non_thread_safe.h"
-#include "remoting/jingle_glue/iq_sender.h"
-#include "remoting/jingle_glue/signal_strategy.h"
-
-namespace remoting {
-
-class FakeSignalStrategy : public SignalStrategy,
- public base::NonThreadSafe {
- public:
- static void Connect(FakeSignalStrategy* peer1, FakeSignalStrategy* peer2);
-
- FakeSignalStrategy(const std::string& jid);
- virtual ~FakeSignalStrategy();
-
- const std::list<buzz::XmlElement*>& received_messages() {
- return received_messages_;
- }
-
- // SignalStrategy interface.
- virtual void Connect() OVERRIDE;
- virtual void Disconnect() OVERRIDE;
- virtual State GetState() const OVERRIDE;
- virtual Error GetError() const OVERRIDE;
- virtual std::string GetLocalJid() const OVERRIDE;
- virtual void AddListener(Listener* listener) OVERRIDE;
- virtual void RemoveListener(Listener* listener) OVERRIDE;
- virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) OVERRIDE;
- virtual std::string GetNextId() OVERRIDE;
-
- private:
- // Called by the |peer_|. Takes ownership of |stanza|.
- void OnIncomingMessage(scoped_ptr<buzz::XmlElement> stanza);
-
- void DeliverIncomingMessages();
-
- std::string jid_;
- FakeSignalStrategy* peer_;
- ObserverList<Listener, true> listeners_;
-
- int last_id_;
-
- // All received messages, includes thouse still in |pending_messages_|.
- std::list<buzz::XmlElement*> received_messages_;
-
- // Queue of messages that have yet to be delivered to observers.
- std::queue<buzz::XmlElement*> pending_messages_;
-
- base::WeakPtrFactory<FakeSignalStrategy> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeSignalStrategy);
-};
-
-} // namespace remoting
-
-#endif // REMOTING_JINGLE_GLUE_FAKE_SIGNAL_STRATEGY_H_
« no previous file with comments | « remoting/jingle_glue/chromium_socket_factory_unittest.cc ('k') | remoting/jingle_glue/fake_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698