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/xmpp_signal_strategy.cc

Issue 8790011: Roll libjingle to 99. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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 | « jingle/notifier/base/notifier_options_util.cc ('k') | third_party/libjingle/libjingle.gyp » ('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/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_socket_adapter.h" 10 #include "remoting/jingle_glue/xmpp_socket_adapter.h"
(...skipping 22 matching lines...) Expand all
33 33
34 void XmppSignalStrategy::Init(StatusObserver* observer) { 34 void XmppSignalStrategy::Init(StatusObserver* observer) {
35 observer_ = observer; 35 observer_ = observer;
36 36
37 buzz::Jid login_jid(username_); 37 buzz::Jid login_jid(username_);
38 38
39 buzz::XmppClientSettings settings; 39 buzz::XmppClientSettings settings;
40 settings.set_user(login_jid.node()); 40 settings.set_user(login_jid.node());
41 settings.set_host(login_jid.domain()); 41 settings.set_host(login_jid.domain());
42 settings.set_resource("chromoting"); 42 settings.set_resource("chromoting");
43 settings.set_use_tls(true); 43 settings.set_use_tls(buzz::TLS_ENABLED);
44 settings.set_token_service(auth_token_service_); 44 settings.set_token_service(auth_token_service_);
45 settings.set_auth_cookie(auth_token_); 45 settings.set_auth_cookie(auth_token_);
46 settings.set_server(talk_base::SocketAddress("talk.google.com", 5222)); 46 settings.set_server(talk_base::SocketAddress("talk.google.com", 5222));
47 47
48 buzz::AsyncSocket* socket = new XmppSocketAdapter(settings, false); 48 buzz::AsyncSocket* socket = new XmppSocketAdapter(settings, false);
49 49
50 xmpp_client_ = new buzz::XmppClient(thread_->task_pump()); 50 xmpp_client_ = new buzz::XmppClient(thread_->task_pump());
51 xmpp_client_->Connect(settings, "", socket, CreatePreXmppAuth(settings)); 51 xmpp_client_->Connect(settings, "", socket, CreatePreXmppAuth(settings));
52 xmpp_client_->SignalStateChange.connect( 52 xmpp_client_->SignalStateChange.connect(
53 this, &XmppSignalStrategy::OnConnectionStateChanged); 53 this, &XmppSignalStrategy::OnConnectionStateChanged);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 return new notifier::GaiaTokenPreXmppAuth( 147 return new notifier::GaiaTokenPreXmppAuth(
148 jid.Str(), 148 jid.Str(),
149 settings.auth_cookie(), 149 settings.auth_cookie(),
150 settings.token_service(), 150 settings.token_service(),
151 mechanism); 151 mechanism);
152 } 152 }
153 153
154 } // namespace remoting 154 } // namespace remoting
OLDNEW
« no previous file with comments | « jingle/notifier/base/notifier_options_util.cc ('k') | third_party/libjingle/libjingle.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698