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

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

Issue 7008003: Wire in OAuth2 support into non-sandboxed connections in libjingle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright + rebase Created 9 years, 6 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/simple_host_process.cc ('k') | remoting/protocol/connection_to_host.h » ('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/jingle_client.h" 5 #include "remoting/jingle_glue/jingle_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h" 10 #include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 break; 107 break;
108 default: 108 default:
109 NOTREACHED(); 109 NOTREACHED();
110 break; 110 break;
111 } 111 }
112 } 112 }
113 113
114 buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth( 114 buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth(
115 const buzz::XmppClientSettings& settings) { 115 const buzz::XmppClientSettings& settings) {
116 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY); 116 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY);
117 std::string mechanism = notifier::GaiaTokenPreXmppAuth::kDefaultAuthMechanism;
118 if (settings.token_service() == "oauth2") {
119 mechanism = "X-OAUTH2";
120 }
121
117 return new notifier::GaiaTokenPreXmppAuth( 122 return new notifier::GaiaTokenPreXmppAuth(
118 jid.Str(), 123 jid.Str(),
119 settings.auth_cookie(), 124 settings.auth_cookie(),
120 settings.token_service(), 125 settings.token_service(),
121 notifier::GaiaTokenPreXmppAuth::kDefaultAuthMechanism); 126 mechanism);
122 } 127 }
123 128
124 129
125 JavascriptSignalStrategy::JavascriptSignalStrategy(const std::string& your_jid) 130 JavascriptSignalStrategy::JavascriptSignalStrategy(const std::string& your_jid)
126 : your_jid_(your_jid) { 131 : your_jid_(your_jid) {
127 } 132 }
128 133
129 JavascriptSignalStrategy::~JavascriptSignalStrategy() { 134 JavascriptSignalStrategy::~JavascriptSignalStrategy() {
130 } 135 }
131 136
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 << ", stun: " << stun_servers; 359 << ", stun: " << stun_servers;
355 port_allocator_->SetRelayToken(token); 360 port_allocator_->SetRelayToken(token);
356 port_allocator_->SetStunHosts(stun_hosts); 361 port_allocator_->SetStunHosts(stun_hosts);
357 port_allocator_->SetRelayHosts(relay_hosts); 362 port_allocator_->SetRelayHosts(relay_hosts);
358 } else { 363 } else {
359 LOG(INFO) << "Jingle info found but no port allocator."; 364 LOG(INFO) << "Jingle info found but no port allocator.";
360 } 365 }
361 } 366 }
362 367
363 } // namespace remoting 368 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/protocol/connection_to_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698