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

Unified Diff: remoting/client/plugin/chromoting_instance.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
« no previous file with comments | « remoting/client/client_config.cc ('k') | remoting/client/plugin/chromoting_scriptable_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
===================================================================
--- remoting/client/plugin/chromoting_instance.cc (revision 139575)
+++ remoting/client/plugin/chromoting_instance.cc (working copy)
@@ -110,19 +110,25 @@
bool ChromotingInstance::ParseAuthMethods(const std::string& auth_methods_str,
ClientConfig* config) {
- std::vector<std::string> auth_methods;
- base::SplitString(auth_methods_str, ',', &auth_methods);
- for (std::vector<std::string>::iterator it = auth_methods.begin();
- it != auth_methods.end(); ++it) {
- protocol::AuthenticationMethod authentication_method =
- protocol::AuthenticationMethod::FromString(*it);
- if (authentication_method.is_valid())
- config->authentication_methods.push_back(authentication_method);
+ if (auth_methods_str == "v1_token") {
+ config->use_v1_authenticator = true;
+ } else {
+ config->use_v1_authenticator = false;
+
+ std::vector<std::string> auth_methods;
+ base::SplitString(auth_methods_str, ',', &auth_methods);
+ for (std::vector<std::string>::iterator it = auth_methods.begin();
+ it != auth_methods.end(); ++it) {
+ protocol::AuthenticationMethod authentication_method =
+ protocol::AuthenticationMethod::FromString(*it);
+ if (authentication_method.is_valid())
+ config->authentication_methods.push_back(authentication_method);
+ }
+ if (config->authentication_methods.empty()) {
+ LOG(ERROR) << "No valid authentication methods specified.";
+ return false;
+ }
}
- if (config->authentication_methods.empty()) {
- LOG(ERROR) << "No valid authentication methods specified.";
- return false;
- }
return true;
}
« no previous file with comments | « remoting/client/client_config.cc ('k') | remoting/client/plugin/chromoting_scriptable_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698