Index: chrome/browser/android/dev_tools_server.cc |
diff --git a/chrome/browser/android/dev_tools_server.cc b/chrome/browser/android/dev_tools_server.cc |
index a65c7bb9d5053c3b3ab5d2807b05e7573ae281dc..6e4a53b42c72e5804aa510f852955530a548c054 100644 |
--- a/chrome/browser/android/dev_tools_server.cc |
+++ b/chrome/browser/android/dev_tools_server.cc |
@@ -86,7 +86,7 @@ class DevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate { |
auth_callback_(auth_callback) { |
} |
- virtual std::string GetDiscoveryPageHTML() override { |
+ std::string GetDiscoveryPageHTML() override { |
// TopSites updates itself after a delay. Ask TopSites to update itself |
// when we're about to show the remote debugging landing page. |
content::BrowserThread::PostTask( |
@@ -97,22 +97,24 @@ class DevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate { |
IDR_DEVTOOLS_DISCOVERY_PAGE_HTML).as_string(); |
} |
- virtual bool BundlesFrontendResources() override { |
+ bool BundlesFrontendResources() override { |
return false; |
} |
- virtual base::FilePath GetDebugFrontendDir() override { |
+ base::FilePath GetDebugFrontendDir() override { |
return base::FilePath(); |
} |
- virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( |
- net::StreamListenSocket::Delegate* delegate, |
- std::string* name) override { |
+ scoped_ptr<net::ServerSocket> |
+ CreateSocketForTethering(std::string* name) override { |
*name = base::StringPrintf( |
kTetheringSocketName, getpid(), ++last_tethering_socket_); |
- return net::deprecated::UnixDomainListenSocket:: |
- CreateAndListenWithAbstractNamespace( |
- *name, "", delegate, auth_callback_); |
+ scoped_ptr<net::UnixDomainServerSocket> socket( |
+ new net::UnixDomainServerSocket(auth_callback_, true)); |
+ if (socket->ListenWithAddressAndPort(*name, 0, 10) != net::OK) |
dgozman
2014/11/06 14:33:17
nit: make 10 a named constant.
vkuzkokov
2014/11/06 16:12:43
Done.
|
+ return scoped_ptr<net::ServerSocket>(); |
+ |
+ return socket.Pass(); |
} |
private: |