Index: tools/android/forwarder2/host_forwarder_main.cc |
diff --git a/tools/android/forwarder2/host_forwarder_main.cc b/tools/android/forwarder2/host_forwarder_main.cc |
index f5d8e2f85d89c6d4849b6539aff94aa9c41919d9..3e08321930da56a44a2b9f1c85781c2738da61fb 100644 |
--- a/tools/android/forwarder2/host_forwarder_main.cc |
+++ b/tools/android/forwarder2/host_forwarder_main.cc |
@@ -28,7 +28,6 @@ |
#include "base/memory/scoped_vector.h" |
#include "base/memory/weak_ptr.h" |
#include "base/pickle.h" |
-#include "base/safe_strerror_posix.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_piece.h" |
#include "base/strings/string_split.h" |
@@ -94,8 +93,7 @@ class HostControllersManager { |
if (!thread_.get()) |
return; |
// Delete the controllers on the thread they were created on. |
- thread_->message_loop_proxy()->DeleteSoon( |
- FROM_HERE, controllers_.release()); |
+ thread_->task_runner()->DeleteSoon(FROM_HERE, controllers_.release()); |
} |
void HandleRequest(const std::string& adb_path, |
@@ -105,7 +103,7 @@ class HostControllersManager { |
scoped_ptr<Socket> client_socket) { |
// Lazy initialize so that the CLI process doesn't get this thread created. |
InitOnce(); |
- thread_->message_loop_proxy()->PostTask( |
+ thread_->task_runner()->PostTask( |
FROM_HERE, |
base::Bind(&HostControllersManager::HandleRequestOnInternalThread, |
base::Unretained(this), adb_path, device_serial, device_port, |
@@ -144,7 +142,7 @@ class HostControllersManager { |
// then all the controllers (including |controller|) were also deleted. |
return; |
} |
- DCHECK(manager->thread_->message_loop_proxy()->RunsTasksOnCurrentThread()); |
+ DCHECK(manager->thread_->task_runner()->RunsTasksOnCurrentThread()); |
// Note that this will delete |controller| which is owned by the map. |
DeleteRefCountedValueInMap( |
MakeHostControllerMapKey( |
@@ -332,8 +330,8 @@ class ServerDelegate : public Daemon::ServerDelegate { |
has_failed_ = true; |
return; |
} |
- const Pickle command_pickle(buf, bytes_read); |
- PickleIterator pickle_it(command_pickle); |
+ const base::Pickle command_pickle(buf, bytes_read); |
+ base::PickleIterator pickle_it(command_pickle); |
std::string device_serial; |
CHECK(pickle_it.ReadString(&device_serial)); |
int device_port; |
@@ -358,10 +356,8 @@ class ServerDelegate : public Daemon::ServerDelegate { |
class ClientDelegate : public Daemon::ClientDelegate { |
public: |
- ClientDelegate(const Pickle& command_pickle) |
- : command_pickle_(command_pickle), |
- has_failed_(false) { |
- } |
+ ClientDelegate(const base::Pickle& command_pickle) |
+ : command_pickle_(command_pickle), has_failed_(false) {} |
bool has_failed() const { return has_failed_; } |
@@ -387,7 +383,7 @@ class ClientDelegate : public Daemon::ClientDelegate { |
} |
private: |
- const Pickle command_pickle_; |
+ const base::Pickle command_pickle_; |
bool has_failed_; |
}; |
@@ -419,7 +415,7 @@ int RunHostForwarder(int argc, char** argv) { |
std::string adb_path = "adb"; |
bool kill_server = false; |
- Pickle pickle; |
+ base::Pickle pickle; |
pickle.WriteString( |
cmd_line.HasSwitch("serial-id") ? |
cmd_line.GetSwitchValueASCII("serial-id") : std::string()); |