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

Unified Diff: remoting/protocol/negotiating_host_authenticator.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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 | « media/renderers/video_renderer_impl_unittest.cc ('k') | ui/aura/bench/bench_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/negotiating_host_authenticator.cc
diff --git a/remoting/protocol/negotiating_host_authenticator.cc b/remoting/protocol/negotiating_host_authenticator.cc
index 37c7a57e52002601460d83025f940473430b62fd..c4dada44e2fbe36af7f7180a938b8e4935fe6210 100644
--- a/remoting/protocol/negotiating_host_authenticator.cc
+++ b/remoting/protocol/negotiating_host_authenticator.cc
@@ -99,12 +99,12 @@ void NegotiatingHostAuthenticator::ProcessMessage(
// Find the first mutually-supported method in the client's list of
// supported-methods.
- 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);
+ 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);
if (list_value.is_valid() &&
std::find(methods_.begin(),
methods_.end(), list_value) != methods_.end()) {
« no previous file with comments | « media/renderers/video_renderer_impl_unittest.cc ('k') | ui/aura/bench/bench_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698