adb: switch handle_host_request to string_view.
Test: test_adb.py
Test: test_device.py
Change-Id: Ideae5262a6dff2e27c50f666144d48f874837290
diff --git a/adb/sockets.cpp b/adb/sockets.cpp
index 420a6d5..df0104b 100644
--- a/adb/sockets.cpp
+++ b/adb/sockets.cpp
@@ -808,8 +808,7 @@
// Some requests are handled immediately -- in that case the handle_host_request() routine
// has sent the OKAY or FAIL message and all we have to do is clean up.
- // TODO: Convert to string_view.
- if (handle_host_request(std::string(service).c_str(), type,
+ if (handle_host_request(service, type,
serial.empty() ? nullptr : std::string(serial).c_str(),
transport_id, s->peer->fd, s)) {
LOG(VERBOSE) << "SS(" << s->id << "): handled host service '" << service << "'";