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

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

Issue 497223003: Revert of Replace StreamListenSocket with StreamSocket in HttpServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
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 2508c59ae50a5e8015c777816844b6f586630b70..e93091e6228b52c1fb831ba95a000961c259a9d7 100644
--- a/chrome/test/chromedriver/server/chromedriver_server.cc
+++ b/chrome/test/chromedriver/server/chromedriver_server.cc
@@ -33,7 +33,7 @@
#include "net/server/http_server.h"
#include "net/server/http_server_request_info.h"
#include "net/server/http_server_response_info.h"
-#include "net/socket/tcp_server_socket.h"
+#include "net/socket/tcp_listen_socket.h"
namespace {
@@ -55,10 +55,8 @@
std::string binding_ip = kLocalHostAddress;
if (allow_remote)
binding_ip = "0.0.0.0";
- 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_ = new net::HttpServer(
+ net::TCPListenSocketFactory(binding_ip, port), this);
net::IPEndPoint address;
return server_->GetLocalAddress(&address) == net::OK;
}
@@ -91,7 +89,7 @@
}
HttpRequestHandlerFunc handle_request_func_;
- scoped_ptr<net::HttpServer> server_;
+ scoped_refptr<net::HttpServer> server_;
base::WeakPtrFactory<HttpServer> weak_factory_; // Should be last.
};
« no previous file with comments | « chrome/test/chromedriver/net/test_http_server.cc ('k') | chromecast/shell/browser/devtools/remote_debugging_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698