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

Unified Diff: net/socket/unix_domain_socket_posix.h

Issue 16093005: [Android] Use a "unique" remote debugging socket name on bind failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always use socket names from MakeSocketPath Created 7 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
« no previous file with comments | « content/shell/shell_devtools_delegate.cc ('k') | net/socket/unix_domain_socket_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/unix_domain_socket_posix.h
diff --git a/net/socket/unix_domain_socket_posix.h b/net/socket/unix_domain_socket_posix.h
index 96601229c4631450be9d89e3248ae1430e0adbfc..2ef06803d24b45e4a3f2ba8e1e7d190980765c44 100644
--- a/net/socket/unix_domain_socket_posix.h
+++ b/net/socket/unix_domain_socket_posix.h
@@ -45,9 +45,11 @@ class NET_EXPORT UnixDomainSocket : public StreamListenSocket {
#if defined(SOCKET_ABSTRACT_NAMESPACE_SUPPORTED)
// Same as above except that the created socket uses the abstract namespace
- // which is a Linux-only feature.
+ // which is a Linux-only feature. If |fallback_path| is not empty,
+ // make the second attempt with the provided fallback name.
static scoped_refptr<UnixDomainSocket> CreateAndListenWithAbstractNamespace(
const std::string& path,
+ const std::string& fallback_path,
StreamListenSocket::Delegate* del,
const AuthCallback& auth_callback);
#endif
@@ -60,6 +62,7 @@ class NET_EXPORT UnixDomainSocket : public StreamListenSocket {
static UnixDomainSocket* CreateAndListenInternal(
const std::string& path,
+ const std::string& fallback_path,
StreamListenSocket::Delegate* del,
const AuthCallback& auth_callback,
bool use_abstract_namespace);
@@ -103,6 +106,7 @@ class NET_EXPORT UnixDomainSocketWithAbstractNamespaceFactory
public:
UnixDomainSocketWithAbstractNamespaceFactory(
const std::string& path,
+ const std::string& fallback_path,
const UnixDomainSocket::AuthCallback& auth_callback);
virtual ~UnixDomainSocketWithAbstractNamespaceFactory();
@@ -111,6 +115,8 @@ class NET_EXPORT UnixDomainSocketWithAbstractNamespaceFactory
StreamListenSocket::Delegate* delegate) const OVERRIDE;
private:
+ std::string fallback_path_;
+
DISALLOW_COPY_AND_ASSIGN(UnixDomainSocketWithAbstractNamespaceFactory);
};
#endif
« no previous file with comments | « content/shell/shell_devtools_delegate.cc ('k') | net/socket/unix_domain_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698