| Index: chrome/test/chromedriver/util.cc
|
| diff --git a/chrome/test/chromedriver/util.cc b/chrome/test/chromedriver/util.cc
|
| index e91689d45dcc257d5224f2e3f9876bfe64a05a1c..7671cc7670c56df63a4c43c262792571ce3d42b2 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,7 +19,9 @@
|
| #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 "chrome/test/chromedriver/session.h"
|
| #include "third_party/zlib/google/zip.h"
|
|
|
| std::string GenerateId() {
|
| @@ -401,3 +404,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();
|
| + it != session->command_listeners.end();
|
| + ++it) {
|
| + Status status = (*it)->BeforeCommand(command_name);
|
| + if (status.IsError())
|
| + LOG(ERROR) << "Error when notifying listener of command";
|
| + }
|
| +}
|
|
|