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

Unified Diff: remoting/client/plugin/chromoting_scriptable_object.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/plugin/chromoting_scriptable_object.h ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_scriptable_object.cc
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
index b9b8073f572ddd0a53397549ceaed86b70fdfb03..a2b85b8005e8f1ed82ea6abad2b10a16e70f1259 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/stringprintf.h"
#include "ppapi/cpp/var.h"
+#include "remoting/base/auth_token_util.h"
#include "remoting/client/client_config.h"
#include "remoting/client/chromoting_stats.h"
#include "remoting/client/plugin/chromoting_instance.h"
@@ -387,7 +388,7 @@ Var ChromotingScriptableObject::DoConnectUnsandboxed(
// Parameter order is:
// host_jid
// username
- // xmpp_token
+ // auth_token
// access_code (optional)
unsigned int arg = 0;
if (!args[arg].is_string()) {
@@ -403,10 +404,15 @@ Var ChromotingScriptableObject::DoConnectUnsandboxed(
std::string username = args[arg++].AsString();
if (!args[arg].is_string()) {
- *exception = Var("The auth_token must be a string.");
+ *exception = Var("The auth_token_with_service must be a string.");
return Var();
}
- std::string auth_token = args[arg++].AsString();
+ std::string auth_token_with_service = args[arg++].AsString();
+
+ std::string auth_service;
+ std::string auth_token;
+ ParseAuthTokenWithService(auth_token_with_service, &auth_token,
+ &auth_service);
std::string access_code;
if (args.size() > arg) {
@@ -427,8 +433,10 @@ Var ChromotingScriptableObject::DoConnectUnsandboxed(
config.host_jid = host_jid;
config.username = username;
config.auth_token = auth_token;
+ config.auth_service = auth_service;
config.nonce = access_code;
VLOG(1) << "host_jid: " << host_jid << ", username: " << username
+ << ", auth_service: " << auth_service
<< ", access_code: " << access_code;
instance_->Connect(config);
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.h ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698