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

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

Issue 2777883003: Remove ScopedVector from chrome/test/chromedriver/ (Closed)
Patch Set: address nit from stgao@ Created 3 years, 9 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/session.h ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/session.cc
diff --git a/chrome/test/chromedriver/session.cc b/chrome/test/chromedriver/session.cc
index 2d4db3f120960ee964e9624153e15087865e62ed..cbcaa77b008efe2171e20306941de21df4431bbc 100644
--- a/chrome/test/chromedriver/session.cc
+++ b/chrome/test/chromedriver/session.cc
@@ -92,22 +92,17 @@ std::string Session::GetCurrentFrameId() const {
std::vector<WebDriverLog*> Session::GetAllLogs() const {
std::vector<WebDriverLog*> logs;
- for (ScopedVector<WebDriverLog>::const_iterator log = devtools_logs.begin();
- log != devtools_logs.end();
- ++log) {
- logs.push_back(*log);
- }
+ for (const auto& log : devtools_logs)
+ logs.push_back(log.get());
if (driver_log)
logs.push_back(driver_log.get());
return logs;
}
std::string Session::GetFirstBrowserError() const {
- for (ScopedVector<WebDriverLog>::const_iterator it = devtools_logs.begin();
- it != devtools_logs.end();
- ++it) {
- if ((*it)->type() == WebDriverLog::kBrowserType) {
- std::string message = (*it)->GetFirstErrorMessage();
+ for (const auto& log : devtools_logs) {
+ if (log->type() == WebDriverLog::kBrowserType) {
+ std::string message = log->GetFirstErrorMessage();
if (!message.empty())
return message;
}
« no previous file with comments | « chrome/test/chromedriver/session.h ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698