Index: remoting/protocol/negotiating_host_authenticator.cc |
diff --git a/remoting/protocol/negotiating_host_authenticator.cc b/remoting/protocol/negotiating_host_authenticator.cc |
index c4dada44e2fbe36af7f7180a938b8e4935fe6210..37c7a57e52002601460d83025f940473430b62fd 100644 |
--- a/remoting/protocol/negotiating_host_authenticator.cc |
+++ b/remoting/protocol/negotiating_host_authenticator.cc |
@@ -99,12 +99,12 @@ |
// Find the first mutually-supported method in the client's list of |
// supported-methods. |
- for (const std::string& method_str : |
- base::SplitString(supported_methods_attr, |
- std::string(1, kSupportedMethodsSeparator), |
- base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { |
- AuthenticationMethod list_value = |
- AuthenticationMethod::FromString(method_str); |
+ std::vector<std::string> supported_methods_strs; |
+ base::SplitString(supported_methods_attr, kSupportedMethodsSeparator, |
+ &supported_methods_strs); |
+ for (std::vector<std::string>::iterator it = supported_methods_strs.begin(); |
+ it != supported_methods_strs.end(); ++it) { |
+ AuthenticationMethod list_value = AuthenticationMethod::FromString(*it); |
if (list_value.is_valid() && |
std::find(methods_.begin(), |
methods_.end(), list_value) != methods_.end()) { |