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

Unified Diff: remoting/client/client_util.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, 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
« no previous file with comments | « remoting/client/client_config.h ('k') | remoting/client/plugin/chromoting_scriptable_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/client_util.cc
diff --git a/remoting/client/client_util.cc b/remoting/client/client_util.cc
index 1f1d16a8ed3a808e874c6381deb9a1adc7440885..4ccdd3d44c5ead11b3a0b279400ce649eb0c2eb2 100644
--- a/remoting/client/client_util.cc
+++ b/remoting/client/client_util.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/string_util.h"
+#include "remoting/base/constants.h"
#include "remoting/client/client_config.h"
using std::string;
@@ -24,6 +25,7 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) {
string host_jid;
string username;
string auth_token;
+ string auth_service(kChromotingTokenDefaultServiceName);
for (int i = 1; i < argc; i++) {
std::string arg = argv[i];
@@ -48,6 +50,12 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) {
found_auth_token = true;
auth_token = argv[i];
}
+ } else if (arg == "--service") {
+ if (++i >= argc) {
+ LOG(WARNING) << "Expected service name to follow --service option";
+ } else {
+ auth_service = argv[i];
+ }
} else {
LOG(WARNING) << "Unrecognized option: " << arg;
}
@@ -66,6 +74,7 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) {
config->host_jid = host_jid;
config->username = username;
config->auth_token = auth_token;
+ config->auth_service = auth_service;
return true;
}
« no previous file with comments | « remoting/client/client_config.h ('k') | remoting/client/plugin/chromoting_scriptable_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698