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

Side by Side Diff: remoting/jingle_glue/xmpp_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
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/xmpp_signal_strategy.h" 5 #include "remoting/jingle_glue/xmpp_signal_strategy.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h" 8 #include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h"
9 #include "remoting/jingle_glue/jingle_thread.h" 9 #include "remoting/jingle_glue/jingle_thread.h"
10 #include "remoting/jingle_glue/xmpp_iq_request.h" 10 #include "remoting/jingle_glue/xmpp_iq_request.h"
(...skipping 11 matching lines...) Expand all
22 : thread_(jingle_thread), 22 : thread_(jingle_thread),
23 listener_(NULL), 23 listener_(NULL),
24 username_(username), 24 username_(username),
25 auth_token_(auth_token), 25 auth_token_(auth_token),
26 auth_token_service_(auth_token_service), 26 auth_token_service_(auth_token_service),
27 xmpp_client_(NULL), 27 xmpp_client_(NULL),
28 observer_(NULL) { 28 observer_(NULL) {
29 } 29 }
30 30
31 XmppSignalStrategy::~XmppSignalStrategy() { 31 XmppSignalStrategy::~XmppSignalStrategy() {
32 if (xmpp_client_)
33 xmpp_client_->engine()->RemoveStanzaHandler(this);
34
35 DCHECK(listener_ == NULL); 32 DCHECK(listener_ == NULL);
33 Close();
36 } 34 }
37 35
38 void XmppSignalStrategy::Init(StatusObserver* observer) { 36 void XmppSignalStrategy::Init(StatusObserver* observer) {
39 observer_ = observer; 37 observer_ = observer;
40 38
41 buzz::Jid login_jid(username_); 39 buzz::Jid login_jid(username_);
42 40
43 buzz::XmppClientSettings settings; 41 buzz::XmppClientSettings settings;
44 settings.set_user(login_jid.node()); 42 settings.set_user(login_jid.node());
45 settings.set_host(login_jid.domain()); 43 settings.set_host(login_jid.domain());
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 126 }
129 127
130 return new notifier::GaiaTokenPreXmppAuth( 128 return new notifier::GaiaTokenPreXmppAuth(
131 jid.Str(), 129 jid.Str(),
132 settings.auth_cookie(), 130 settings.auth_cookie(),
133 settings.token_service(), 131 settings.token_service(),
134 mechanism); 132 mechanism);
135 } 133 }
136 134
137 } // namespace remoting 135 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/javascript_signal_strategy.cc ('k') | remoting/protocol/connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698