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

Unified Diff: remoting/client/plugin/delegating_signal_strategy.cc

Issue 2384063008: Enables delegating signal strategy for It2Me Host. (Closed)
Patch Set: Fix typos Created 4 years, 2 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
« no previous file with comments | « remoting/client/plugin/delegating_signal_strategy.h ('k') | remoting/host/it2me/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/delegating_signal_strategy.cc
diff --git a/remoting/client/plugin/delegating_signal_strategy.cc b/remoting/client/plugin/delegating_signal_strategy.cc
deleted file mode 100644
index bc86f41b0d38faddf42816735e5312d80899d654..0000000000000000000000000000000000000000
--- a/remoting/client/plugin/delegating_signal_strategy.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 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 "remoting/client/plugin/delegating_signal_strategy.h"
-
-#include "base/rand_util.h"
-#include "base/strings/string_number_conversions.h"
-#include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
-
-namespace remoting {
-
-DelegatingSignalStrategy::DelegatingSignalStrategy(
- std::string local_jid,
- const SendIqCallback& send_iq_callback)
- : local_jid_(local_jid),
- send_iq_callback_(send_iq_callback) {
-}
-
-DelegatingSignalStrategy::~DelegatingSignalStrategy() {
-}
-
-void DelegatingSignalStrategy::OnIncomingMessage(const std::string& message) {
- std::unique_ptr<buzz::XmlElement> stanza(buzz::XmlElement::ForStr(message));
- if (!stanza.get()) {
- LOG(WARNING) << "Malformed XMPP stanza received: " << message;
- return;
- }
-
- base::ObserverListBase<Listener>::Iterator it(&listeners_);
- Listener* listener;
- while ((listener = it.GetNext()) != nullptr) {
- if (listener->OnSignalStrategyIncomingStanza(stanza.get()))
- break;
- }
-}
-
-void DelegatingSignalStrategy::Connect() {
-}
-
-void DelegatingSignalStrategy::Disconnect() {
-}
-
-SignalStrategy::State DelegatingSignalStrategy::GetState() const {
- return CONNECTED;
-}
-
-SignalStrategy::Error DelegatingSignalStrategy::GetError() const {
- return OK;
-}
-
-std::string DelegatingSignalStrategy::GetLocalJid() const {
- return local_jid_;
-}
-
-void DelegatingSignalStrategy::AddListener(Listener* listener) {
- listeners_.AddObserver(listener);
-}
-
-void DelegatingSignalStrategy::RemoveListener(Listener* listener) {
- listeners_.RemoveObserver(listener);
-}
-
-bool DelegatingSignalStrategy::SendStanza(
- std::unique_ptr<buzz::XmlElement> stanza) {
- send_iq_callback_.Run(stanza->Str());
- return true;
-}
-
-std::string DelegatingSignalStrategy::GetNextId() {
- return base::Uint64ToString(base::RandUint64());
-}
-
-} // namespace remoting
« no previous file with comments | « remoting/client/plugin/delegating_signal_strategy.h ('k') | remoting/host/it2me/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698