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

Unified Diff: remoting/protocol/protocol_test_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/protocol/protocol_test_client.cc
diff --git a/remoting/protocol/protocol_test_client.cc b/remoting/protocol/protocol_test_client.cc
index 9d01c32425dfb1e5b6d7fa12226f68e428920857..1facad1c7b7082a233086819d8d50246b184928c 100644
--- a/remoting/protocol/protocol_test_client.cc
+++ b/remoting/protocol/protocol_test_client.cc
@@ -27,8 +27,6 @@ extern "C" {
#include "remoting/jingle_glue/jingle_thread.h"
#include "remoting/protocol/jingle_session_manager.h"
-using remoting::kChromotingTokenServiceName;
-
namespace remoting {
namespace protocol {
@@ -223,12 +221,13 @@ void ProtocolTestConnection::HandleReadResult(int result) {
void ProtocolTestClient::Run(const std::string& username,
const std::string& auth_token,
+ const std::string& auth_service,
const std::string& host_jid) {
remoting::JingleThread jingle_thread;
jingle_thread.Start();
signal_strategy_.reset(
new XmppSignalStrategy(&jingle_thread, username, auth_token,
- kChromotingTokenServiceName));
+ auth_service));
client_ = new JingleClient(&jingle_thread, signal_strategy_.get(),
NULL, NULL, NULL, this);
client_->Init();
@@ -374,9 +373,14 @@ int main(int argc, char** argv) {
usage(argv[0]);
std::string auth_token(cmd_line->GetSwitchValueASCII("auth_token"));
+ // Default to OAuth2 for the auth token.
+ std::string auth_service("oauth2");
+ if (cmd_line->HasSwitch("auth_service"))
+ auth_service = cmd_line->GetSwitchValueASCII("auth_service");
+
scoped_refptr<ProtocolTestClient> client(new ProtocolTestClient());
- client->Run(username, auth_token, host_jid);
+ client->Run(username, auth_token, host_jid, auth_service);
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698