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

Unified Diff: android_webview/native/aw_dev_tools_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
« no previous file with comments | « no previous file | chrome/browser/android/dev_tools_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_dev_tools_server.cc
diff --git a/android_webview/native/aw_dev_tools_server.cc b/android_webview/native/aw_dev_tools_server.cc
index 10f3243cd581125aa76dea408c1b8bbd66b4803a..90b72d18a441113b584515e13742b6c541463475 100644
--- a/android_webview/native/aw_dev_tools_server.cc
+++ b/android_webview/native/aw_dev_tools_server.cc
@@ -19,7 +19,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/user_agent.h"
#include "jni/AwDevToolsServer_jni.h"
-#include "net/socket/unix_domain_server_socket_posix.h"
+#include "net/socket/unix_domain_listen_socket_posix.h"
using content::DevToolsAgentHost;
using content::RenderViewHost;
@@ -157,25 +157,6 @@
return json;
}
-// Factory for UnixDomainServerSocket.
-class UnixDomainServerSocketFactory
- : public content::DevToolsHttpHandler::ServerSocketFactory {
- public:
- explicit UnixDomainServerSocketFactory(const std::string& socket_name)
- : content::DevToolsHttpHandler::ServerSocketFactory(socket_name, 0, 1) {}
-
- private:
- // content::DevToolsHttpHandler::ServerSocketFactory.
- virtual scoped_ptr<net::ServerSocket> Create() const OVERRIDE {
- return scoped_ptr<net::ServerSocket>(
- new net::UnixDomainServerSocket(
- base::Bind(&content::CanUserConnectToDevTools),
- true /* use_abstract_namespace */));
- }
-
- DISALLOW_COPY_AND_ASSIGN(UnixDomainServerSocketFactory);
-};
-
} // namespace
namespace android_webview {
@@ -192,11 +173,11 @@
if (protocol_handler_)
return;
- scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory> factory(
- new UnixDomainServerSocketFactory(
- base::StringPrintf(kSocketNameFormat, getpid())));
protocol_handler_ = content::DevToolsHttpHandler::Start(
- factory.Pass(),
+ new net::deprecated::UnixDomainListenSocketWithAbstractNamespaceFactory(
+ base::StringPrintf(kSocketNameFormat, getpid()),
+ "",
+ base::Bind(&content::CanUserConnectToDevTools)),
base::StringPrintf(kFrontEndURL, content::GetWebKitRevision().c_str()),
new AwDevToolsServerDelegate(),
base::FilePath());
« no previous file with comments | « no previous file | chrome/browser/android/dev_tools_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698