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

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

Issue 19616008: [chromedriver] Allow commands to be async. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 5 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/adb_impl.h ('k') | chrome/test/chromedriver/command.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/adb_impl.cc
diff --git a/chrome/test/chromedriver/chrome/adb_impl.cc b/chrome/test/chromedriver/chrome/adb_impl.cc
index c830608ac4ce4a47f742fae93edc515b6722a3e1..cd4919f85f58edacdad711367b4ca4a8881c36f0 100644
--- a/chrome/test/chromedriver/chrome/adb_impl.cc
+++ b/chrome/test/chromedriver/chrome/adb_impl.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_tokenizer.h"
@@ -71,10 +71,10 @@ void ExecuteCommandOnIOThread(
} // namespace
AdbImpl::AdbImpl(
- const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy,
+ const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
Log* log)
- : io_message_loop_proxy_(io_message_loop_proxy), log_(log) {
- CHECK(io_message_loop_proxy_.get());
+ : io_task_runner_(io_task_runner), log_(log) {
+ CHECK(io_task_runner_.get());
}
AdbImpl::~AdbImpl() {}
@@ -185,7 +185,7 @@ Status AdbImpl::ExecuteCommand(
const std::string& command, std::string* response) {
scoped_refptr<ResponseBuffer> response_buffer = new ResponseBuffer;
log_->AddEntry(Log::kDebug, "Sending adb command: " + command);
- io_message_loop_proxy_->PostTask(
+ io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&ExecuteCommandOnIOThread, command, response_buffer));
Status status = response_buffer->GetResponse(
« no previous file with comments | « chrome/test/chromedriver/chrome/adb_impl.h ('k') | chrome/test/chromedriver/command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698