Chromium Code Reviews| Index: chrome/test/chromedriver/util.cc |
| diff --git a/chrome/test/chromedriver/util.cc b/chrome/test/chromedriver/util.cc |
| index e91689d45dcc257d5224f2e3f9876bfe64a05a1c..cf137a94c5c6788bc6eea4a7a8860785619dd149 100644 |
| --- a/chrome/test/chromedriver/util.cc |
| +++ b/chrome/test/chromedriver/util.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/files/file_enumerator.h" |
| #include "base/files/scoped_temp_dir.h" |
| #include "base/format_macros.h" |
| +#include "base/memory/scoped_vector.h" |
| #include "base/rand_util.h" |
| #include "base/strings/string16.h" |
| #include "base/strings/string_util.h" |
| @@ -18,6 +19,7 @@ |
| #include "chrome/test/chromedriver/chrome/status.h" |
| #include "chrome/test/chromedriver/chrome/ui_events.h" |
| #include "chrome/test/chromedriver/chrome/web_view.h" |
| +#include "chrome/test/chromedriver/command_listener.h" |
| #include "chrome/test/chromedriver/key_converter.h" |
| #include "third_party/zlib/google/zip.h" |
| @@ -401,3 +403,15 @@ Status UnzipSoleFile(const base::FilePath& unzip_dir, |
| *file = first_file; |
| return Status(kOk); |
| } |
| + |
| +void NotifySessionListenersBeforeCommand(Session* session, |
| + const std::string& command_name) { |
| + for (ScopedVector<CommandListener>::const_iterator it = |
| + session->command_listeners.begin(); |
|
stgao
2014/06/27 16:48:25
indent.
johnmoore
2014/06/27 21:58:03
Done.
|
| + it != session->command_listeners.end(); |
| + ++it) { |
| + Status status = (*it)->BeforeCommand(command_name); |
| + if (status.IsError()) |
| + LOG(ERROR) << "Error when notifying listener of command"; |
| + } |
| +} |