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

Unified 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: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: remoting/jingle_glue/jingle_client.cc
diff --git a/remoting/jingle_glue/jingle_client.cc b/remoting/jingle_glue/jingle_client.cc
index ce117806bd394e150a86381a239be3b3c3b9be8f..509e6f8ebc8478673b2b2d2c37f52bf2e8663227 100644
--- a/remoting/jingle_glue/jingle_client.cc
+++ b/remoting/jingle_glue/jingle_client.cc
@@ -114,11 +114,16 @@ void XmppSignalStrategy::OnConnectionStateChanged(
buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth(
const buzz::XmppClientSettings& settings) {
buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY);
+ std::string mechanism = notifier::GaiaTokenPreXmppAuth::kDefaultAuthMechanism;
+ if (settings.token_service() == "oauth2") {
+ mechanism = "X-OAUTH2";
+ }
+
return new notifier::GaiaTokenPreXmppAuth(
jid.Str(),
settings.auth_cookie(),
settings.token_service(),
- notifier::GaiaTokenPreXmppAuth::kDefaultAuthMechanism);
+ mechanism);
}

Powered by Google App Engine
This is Rietveld 408576698