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

Side by Side Diff: chrome/test/chromedriver/session_commands.cc

Issue 2777883003: Remove ScopedVector from chrome/test/chromedriver/ (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/chromedriver/session_commands.h" 5 #include "chrome/test/chromedriver/session_commands.h"
6 6
7 #include <list> 7 #include <list>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 &session->unexpected_alert_behaviour); 194 &session->unexpected_alert_behaviour);
195 195
196 Log::Level driver_level = Log::kWarning; 196 Log::Level driver_level = Log::kWarning;
197 if (capabilities.logging_prefs.count(WebDriverLog::kDriverType)) 197 if (capabilities.logging_prefs.count(WebDriverLog::kDriverType))
198 driver_level = capabilities.logging_prefs[WebDriverLog::kDriverType]; 198 driver_level = capabilities.logging_prefs[WebDriverLog::kDriverType];
199 session->driver_log->set_min_level(driver_level); 199 session->driver_log->set_min_level(driver_level);
200 200
201 // Create Log's and DevToolsEventListener's for ones that are DevTools-based. 201 // Create Log's and DevToolsEventListener's for ones that are DevTools-based.
202 // Session will own the Log's, Chrome will own the listeners. 202 // Session will own the Log's, Chrome will own the listeners.
203 // Also create |CommandListener|s for the appropriate logs. 203 // Also create |CommandListener|s for the appropriate logs.
204 ScopedVector<DevToolsEventListener> devtools_event_listeners; 204 std::vector<std::unique_ptr<DevToolsEventListener>> devtools_event_listeners;
205 ScopedVector<CommandListener> command_listeners; 205 std::vector<std::unique_ptr<CommandListener>> command_listeners;
206 status = CreateLogs(capabilities, 206 status = CreateLogs(capabilities,
207 session, 207 session,
208 &session->devtools_logs, 208 &session->devtools_logs,
209 &devtools_event_listeners, 209 &devtools_event_listeners,
210 &command_listeners); 210 &command_listeners);
211 if (status.IsError()) 211 if (status.IsError())
212 return status; 212 return status;
213 213
214 // |session| will own the |CommandListener|s. 214 // |session| will own the |CommandListener|s.
215 session->command_listeners.swap(command_listeners); 215 session->command_listeners.swap(command_listeners);
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 std::unique_ptr<base::Value>* value) { 891 std::unique_ptr<base::Value>* value) {
892 WebView* web_view = nullptr; 892 WebView* web_view = nullptr;
893 Status status = session->GetTargetWindow(&web_view); 893 Status status = session->GetTargetWindow(&web_view);
894 if (status.IsError()) 894 if (status.IsError())
895 return status; 895 return status;
896 status = web_view->DeleteScreenOrientation(); 896 status = web_view->DeleteScreenOrientation();
897 if (status.IsError()) 897 if (status.IsError())
898 return status; 898 return status;
899 return Status(kOk); 899 return Status(kOk);
900 } 900 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698