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

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

Issue 296053012: Replace StreamListenSocket with StreamSocket in HttpServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 2bc95c93630787153fedbea74d620c377c435572..6e8619477b54e1c02f122d37bacd2a79a0131881 100644
--- a/chrome/test/chromedriver/server/chromedriver_server.cc
+++ b/chrome/test/chromedriver/server/chromedriver_server.cc
@@ -33,7 +33,6 @@
#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_listen_socket.h"
namespace {
@@ -55,8 +54,10 @@ class HttpServer : public net::HttpServer::Delegate {
std::string binding_ip = kLocalHostAddress;
if (allow_remote)
binding_ip = "0.0.0.0";
- server_ = new net::HttpServer(
- net::TCPListenSocketFactory(binding_ip, port), this);
+ server_.reset(net::HttpServer::Create(binding_ip, port, this));
+ if (!server_) {
pfeldman 2014/05/22 06:01:05 style nit: we don't put {} around single line bloc
byungchul 2014/05/30 00:19:02 Done.
+ return false;
+ }
net::IPEndPoint address;
return server_->GetLocalAddress(&address) == net::OK;
}
@@ -89,7 +90,7 @@ class HttpServer : public net::HttpServer::Delegate {
}
HttpRequestHandlerFunc handle_request_func_;
- scoped_refptr<net::HttpServer> server_;
+ scoped_ptr<net::HttpServer> server_;
base::WeakPtrFactory<HttpServer> weak_factory_; // Should be last.
};

Powered by Google App Engine
This is Rietveld 408576698