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

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

Issue 10829424: Create stub jingle library for iOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct copyright Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/thread_task_runner_handle.h" 12 #include "base/thread_task_runner_handle.h"
13 #include "jingle/glue/chrome_async_socket.h" 13 #include "jingle/glue/chrome_async_socket.h"
14 #include "jingle/glue/task_pump.h" 14 #include "jingle/glue/task_pump.h"
15 #include "jingle/glue/xmpp_client_socket_factory.h" 15 #include "jingle/glue/xmpp_client_socket_factory.h"
16 #include "jingle/notifier/base/gaia_constants.h"
16 #include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h" 17 #include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h"
17 #include "net/socket/client_socket_factory.h" 18 #include "net/socket/client_socket_factory.h"
18 #include "net/url_request/url_request_context_getter.h" 19 #include "net/url_request/url_request_context_getter.h"
19 #include "third_party/libjingle/source/talk/base/thread.h" 20 #include "third_party/libjingle/source/talk/base/thread.h"
20 #include "third_party/libjingle/source/talk/xmpp/prexmppauth.h" 21 #include "third_party/libjingle/source/talk/xmpp/prexmppauth.h"
21 #include "third_party/libjingle/source/talk/xmpp/saslcookiemechanism.h" 22 #include "third_party/libjingle/source/talk/xmpp/saslcookiemechanism.h"
22 23
23 namespace { 24 namespace {
24 25
25 const char kDefaultResourceName[] = "chromoting"; 26 const char kDefaultResourceName[] = "chromoting";
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 233 }
233 234
234 void XmppSignalStrategy::SendKeepAlive() { 235 void XmppSignalStrategy::SendKeepAlive() {
235 xmpp_client_->SendRaw(" "); 236 xmpp_client_->SendRaw(" ");
236 } 237 }
237 238
238 // static 239 // static
239 buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth( 240 buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth(
240 const buzz::XmppClientSettings& settings) { 241 const buzz::XmppClientSettings& settings) {
241 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY); 242 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY);
242 std::string mechanism = notifier::GaiaTokenPreXmppAuth::kDefaultAuthMechanism; 243 std::string mechanism = notifier::gaia_constants::kDefaultAuthMechanism;
243 if (settings.token_service() == "oauth2") { 244 if (settings.token_service() == "oauth2") {
244 mechanism = "X-OAUTH2"; 245 mechanism = "X-OAUTH2";
245 } 246 }
246 247
247 return new notifier::GaiaTokenPreXmppAuth( 248 return new notifier::GaiaTokenPreXmppAuth(
248 jid.Str(), settings.auth_token(), settings.token_service(), mechanism); 249 jid.Str(), settings.auth_token(), settings.token_service(), mechanism);
249 } 250 }
250 251
251 } // namespace remoting 252 } // namespace remoting
OLDNEW
« jingle/notifier/base/gaia_constants.h ('K') | « jingle/notifier/base/notifier_options.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698