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

Unified Diff: chrome/test/chromedriver/server/chromedriver_server.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: chrome/test/chromedriver/server/chromedriver_server.cc
diff --git a/chrome/test/chromedriver/server/chromedriver_server.cc b/chrome/test/chromedriver/server/chromedriver_server.cc
index fa48a4a3108ab0be6d380ddf453e1f41870c17bd..3158795460f85eb83e37609f88a4a9fcbe992e51 100644
--- a/chrome/test/chromedriver/server/chromedriver_server.cc
+++ b/chrome/test/chromedriver/server/chromedriver_server.cc
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <locale>
#include <string>
+#include <utility>
#include <vector>
#include "base/at_exit.h"
@@ -64,7 +65,7 @@ class HttpServer : public net::HttpServer::Delegate {
scoped_ptr<net::ServerSocket> server_socket(
new net::TCPServerSocket(NULL, net::NetLog::Source()));
server_socket->ListenWithAddressAndPort(binding_ip, port, 1);
- server_.reset(new net::HttpServer(server_socket.Pass(), this));
+ server_.reset(new net::HttpServer(std::move(server_socket), this));
net::IPEndPoint address;
return server_->GetLocalAddress(&address) == net::OK;
}
@@ -127,7 +128,7 @@ void HandleRequestOnCmdThread(
scoped_ptr<net::HttpServerResponseInfo> response(
new net::HttpServerResponseInfo(net::HTTP_UNAUTHORIZED));
response->SetBody("Unauthorized access", "text/plain");
- send_response_func.Run(response.Pass());
+ send_response_func.Run(std::move(response));
return;
}
}
@@ -181,7 +182,7 @@ void RunServer(uint16_t port,
base::MessageLoop cmd_loop;
base::RunLoop cmd_run_loop;
HttpHandler handler(cmd_run_loop.QuitClosure(), io_thread.task_runner(),
- url_base, adb_port, port_server.Pass());
+ url_base, adb_port, std::move(port_server));
HttpRequestHandlerFunc handle_request_func =
base::Bind(&HandleRequestOnCmdThread, &handler, whitelisted_ips);
@@ -311,7 +312,7 @@ int main(int argc, char *argv[]) {
printf("Unable to initialize logging. Exiting...\n");
return 1;
}
- RunServer(port, allow_remote, whitelisted_ips,
- url_base, adb_port, port_server.Pass());
+ RunServer(port, allow_remote, whitelisted_ips, url_base, adb_port,
+ std::move(port_server));
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698