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

Side by Side Diff: remoting/jingle_glue/javascript_signal_strategy.cc

Issue 7312013: Minor cleanups in JingleSession and JingleSessionManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/jingle_glue/xmpp_signal_strategy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/jingle_glue/javascript_signal_strategy.h" 5 #include "remoting/jingle_glue/javascript_signal_strategy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
11 #include "remoting/jingle_glue/iq_request.h" 11 #include "remoting/jingle_glue/iq_request.h"
12 #include "remoting/jingle_glue/xmpp_proxy.h" 12 #include "remoting/jingle_glue/xmpp_proxy.h"
13 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" 13 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 JavascriptSignalStrategy::JavascriptSignalStrategy(const std::string& your_jid) 17 JavascriptSignalStrategy::JavascriptSignalStrategy(const std::string& your_jid)
18 : your_jid_(your_jid), 18 : your_jid_(your_jid),
19 listener_(NULL), 19 listener_(NULL),
20 last_id_(0) { 20 last_id_(0) {
21 } 21 }
22 22
23 JavascriptSignalStrategy::~JavascriptSignalStrategy() { 23 JavascriptSignalStrategy::~JavascriptSignalStrategy() {
24 DCHECK(listener_ == NULL); 24 DCHECK(listener_ == NULL);
25 Close();
25 } 26 }
26 27
27 void JavascriptSignalStrategy::AttachXmppProxy( 28 void JavascriptSignalStrategy::AttachXmppProxy(
28 scoped_refptr<XmppProxy> xmpp_proxy) { 29 scoped_refptr<XmppProxy> xmpp_proxy) {
29 xmpp_proxy_ = xmpp_proxy; 30 xmpp_proxy_ = xmpp_proxy;
30 xmpp_proxy_->AttachCallback(AsWeakPtr()); 31 xmpp_proxy_->AttachCallback(AsWeakPtr());
31 } 32 }
32 33
33 void JavascriptSignalStrategy::Init(StatusObserver* observer) { 34 void JavascriptSignalStrategy::Init(StatusObserver* observer) {
34 DCHECK(CalledOnValidThread()); 35 DCHECK(CalledOnValidThread());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 LOG(WARNING) << "Malformed XMPP stanza received: " << stanza_str; 88 LOG(WARNING) << "Malformed XMPP stanza received: " << stanza_str;
88 return; 89 return;
89 } 90 }
90 91
91 if (listener_) 92 if (listener_)
92 listener_->OnIncomingStanza(stanza.get()); 93 listener_->OnIncomingStanza(stanza.get());
93 iq_registry_.OnIncomingStanza(stanza.get()); 94 iq_registry_.OnIncomingStanza(stanza.get());
94 } 95 }
95 96
96 } // namespace remoting 97 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/jingle_glue/xmpp_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698