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

Unified Diff: chrome/test/chromedriver/commands.cc

Issue 1715683002: chrome: Use base's ContainsValue helper function instead of std::find (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per latest code Created 4 years, 8 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 | « chrome/test/chromedriver/chrome/device_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/commands.cc
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc
index bd6cae8132340c4f9b776fbdc444250883b6394d..109ba953ff216c5224063c8346feab79cc2202bf 100644
--- a/chrome/test/chromedriver/commands.cc
+++ b/chrome/test/chromedriver/commands.cc
@@ -18,6 +18,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
#include "base/thread_task_runner_handle.h"
@@ -251,9 +252,7 @@ void ExecuteSessionCommandOnSessionThread(
if (status_tmp.IsError() && status_tmp.code() != kChromeNotReachable) {
status.AddDetails(
"failed to check if window was closed: " + status_tmp.message());
- } else if (std::find(web_view_ids.begin(),
- web_view_ids.end(),
- session->window) == web_view_ids.end()) {
+ } else if (!ContainsValue(web_view_ids, session->window)) {
status = Status(kOk);
}
}
« no previous file with comments | « chrome/test/chromedriver/chrome/device_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698