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

Unified Diff: remoting/client/plugin/chromoting_scriptable_object.cc

Issue 10453080: Revert 139424 - Remove V1 authenticators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/client/plugin/chromoting_scriptable_object.cc
===================================================================
--- remoting/client/plugin/chromoting_scriptable_object.cc (revision 139575)
+++ remoting/client/plugin/chromoting_scriptable_object.cc (working copy)
@@ -390,22 +390,31 @@
}
config.shared_secret = args[arg++].AsString();
- if (!args[arg].is_string()) {
- *exception = Var("The authentication_methods must be a string.");
- return Var();
- }
+ // Older versions of the webapp do not supply the following two
+ // parameters.
- if (!ChromotingInstance::ParseAuthMethods(
- args[arg++].AsString(), &config)) {
- *exception = Var("No valid authentication methods specified.");
- return Var();
+ // By default use V1 authentication.
+ config.use_v1_authenticator = true;
+ if (args.size() > arg) {
+ if (!args[arg].is_string()) {
+ *exception = Var("The authentication_methods must be a string.");
+ return Var();
+ }
+
+ if (!ChromotingInstance::ParseAuthMethods(
+ args[arg++].AsString(), &config)) {
+ *exception = Var("No valid authentication methods specified.");
+ return Var();
+ }
}
- if (!args[arg].is_string()) {
- *exception = Var("The authentication_tag must be a string.");
- return Var();
+ if (args.size() > arg) {
+ if (!args[arg].is_string()) {
+ *exception = Var("The authentication_tag must be a string.");
+ return Var();
+ }
+ config.authentication_tag = args[arg++].AsString();
}
- config.authentication_tag = args[arg++].AsString();
if (args.size() != arg) {
*exception = Var("Too many agruments passed to connect().");
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/protocol/it2me_host_authenticator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698