| Index: cloud_print/gcp20/prototype/privet_http_server.cc
|
| diff --git a/cloud_print/gcp20/prototype/privet_http_server.cc b/cloud_print/gcp20/prototype/privet_http_server.cc
|
| index 9aa2835d19541658898f7fb87a19a2ed04a37c8f..816fd05b33a8629804d6ebe30f8573759fd319fc 100644
|
| --- a/cloud_print/gcp20/prototype/privet_http_server.cc
|
| +++ b/cloud_print/gcp20/prototype/privet_http_server.cc
|
| @@ -10,7 +10,7 @@
|
| #include "net/base/ip_endpoint.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/base/url_util.h"
|
| -#include "net/socket/tcp_listen_socket.h"
|
| +#include "net/socket/tcp_server_socket.h"
|
| #include "url/gurl.h"
|
|
|
| namespace {
|
| @@ -105,10 +105,11 @@ bool PrivetHttpServer::Start(uint16 port) {
|
| if (server_)
|
| return true;
|
|
|
| - net::TCPListenSocketFactory factory("0.0.0.0", port);
|
| - server_ = new net::HttpServer(factory, this);
|
| - net::IPEndPoint address;
|
| + net::TCPServerSocketFactory factory;
|
| + factory.SetAddressAndPort("0.0.0.0", port);
|
| + server_.reset(new net::HttpServer(factory.CreateAndListen(), this));
|
|
|
| + net::IPEndPoint address;
|
| if (server_->GetLocalAddress(&address) != net::OK) {
|
| NOTREACHED() << "Cannot start HTTP server";
|
| return false;
|
| @@ -122,7 +123,7 @@ void PrivetHttpServer::Shutdown() {
|
| if (!server_)
|
| return;
|
|
|
| - server_ = NULL;
|
| + server_.reset(NULL);
|
| }
|
|
|
| void PrivetHttpServer::OnHttpRequest(int connection_id,
|
|
|