diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-13 17:32:45 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-13 17:32:45 +0000 |
commit | 8b5e1879c72bc3bb95b36bffdcba0958fa447127 (patch) | |
tree | 7076164b7a6404e7ffee3e8f39c5d28baac6e34d /net | |
parent | 74ac67ce688465ca6b6e50c6f1e79f308508568c (diff) | |
download | chromium_src-8b5e1879c72bc3bb95b36bffdcba0958fa447127.zip chromium_src-8b5e1879c72bc3bb95b36bffdcba0958fa447127.tar.gz chromium_src-8b5e1879c72bc3bb95b36bffdcba0958fa447127.tar.bz2 |
Merge 255900 "Bind before sandbox lockdown on Windows."
> Bind before sandbox lockdown on Windows.
> Linux is unaffected. All changed code already is inside sandbox.
>
> BUG=348692
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255311
>
> Review URL: https://codereview.chromium.org/185293014
TBR=vitalybuka@chromium.org
Review URL: https://codereview.chromium.org/197283009
git-svn-id: svn://svn.chromium.org/chrome/branches/1847/src@256865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/dns/mock_mdns_socket_factory.h | 2 | ||||
-rw-r--r-- | net/udp/datagram_server_socket.h | 3 | ||||
-rw-r--r-- | net/udp/udp_server_socket.cc | 4 | ||||
-rw-r--r-- | net/udp/udp_server_socket.h | 1 | ||||
-rw-r--r-- | net/udp/udp_socket_libevent.cc | 4 | ||||
-rw-r--r-- | net/udp/udp_socket_libevent.h | 3 | ||||
-rw-r--r-- | net/udp/udp_socket_win.cc | 4 | ||||
-rw-r--r-- | net/udp/udp_socket_win.h | 3 |
8 files changed, 24 insertions, 0 deletions
diff --git a/net/dns/mock_mdns_socket_factory.h b/net/dns/mock_mdns_socket_factory.h index 7cc8fed..04bb837 100644 --- a/net/dns/mock_mdns_socket_factory.h +++ b/net/dns/mock_mdns_socket_factory.h @@ -54,6 +54,8 @@ class MockMDnsDatagramServerSocket : public DatagramServerSocket { MOCK_METHOD1(SetDiffServCodePoint, int(DiffServCodePoint dscp)); + MOCK_METHOD0(DetachFromThread, void()); + void SetResponsePacket(std::string response_packet); int HandleRecvNow(IOBuffer* buffer, int size, IPEndPoint* address, diff --git a/net/udp/datagram_server_socket.h b/net/udp/datagram_server_socket.h index ed5ab7a..a7191d1 100644 --- a/net/udp/datagram_server_socket.h +++ b/net/udp/datagram_server_socket.h @@ -103,6 +103,9 @@ class NET_EXPORT DatagramServerSocket : public DatagramSocket { // Set the Differentiated Services Code Point. May do nothing on // some platforms. Returns a network error code. virtual int SetDiffServCodePoint(DiffServCodePoint dscp) = 0; + + // Resets the thread to be used for thread-safety checks. + virtual void DetachFromThread() = 0; }; } // namespace net diff --git a/net/udp/udp_server_socket.cc b/net/udp/udp_server_socket.cc index 99d741b..ad19655 100644 --- a/net/udp/udp_server_socket.cc +++ b/net/udp/udp_server_socket.cc @@ -93,4 +93,8 @@ int UDPServerSocket::SetDiffServCodePoint(DiffServCodePoint dscp) { return socket_.SetDiffServCodePoint(dscp); } +void UDPServerSocket::DetachFromThread() { + socket_.DetachFromThread(); +} + } // namespace net diff --git a/net/udp/udp_server_socket.h b/net/udp/udp_server_socket.h index c593413..46e8b78 100644 --- a/net/udp/udp_server_socket.h +++ b/net/udp/udp_server_socket.h @@ -45,6 +45,7 @@ class NET_EXPORT UDPServerSocket : public DatagramServerSocket { virtual int SetMulticastTimeToLive(int time_to_live) OVERRIDE; virtual int SetMulticastLoopbackMode(bool loopback) OVERRIDE; virtual int SetDiffServCodePoint(DiffServCodePoint dscp) OVERRIDE; + virtual void DetachFromThread() OVERRIDE; private: UDPSocket socket_; diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc index a51567d..d3fbad4 100644 --- a/net/udp/udp_socket_libevent.cc +++ b/net/udp/udp_socket_libevent.cc @@ -767,4 +767,8 @@ int UDPSocketLibevent::SetDiffServCodePoint(DiffServCodePoint dscp) { return OK; } +void UDPSocketLibevent::DetachFromThread() { + base::NonThreadSafe::DetachFromThread(); +} + } // namespace net diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h index 2d1cefd..130dcaf 100644 --- a/net/udp/udp_socket_libevent.h +++ b/net/udp/udp_socket_libevent.h @@ -163,6 +163,9 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe { // Return a network error code. int SetDiffServCodePoint(DiffServCodePoint dscp); + // Resets the thread to be used for thread-safety checks. + void DetachFromThread(); + private: enum SocketOptions { SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc index cd4ec4a..f084037 100644 --- a/net/udp/udp_socket_win.cc +++ b/net/udp/udp_socket_win.cc @@ -810,4 +810,8 @@ int UDPSocketWin::SetDiffServCodePoint(DiffServCodePoint dscp) { return ERR_NOT_IMPLEMENTED; } +void UDPSocketWin::DetachFromThread() { + base::NonThreadSafe::DetachFromThread(); +} + } // namespace net diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h index 2f24877..28b7d4a 100644 --- a/net/udp/udp_socket_win.h +++ b/net/udp/udp_socket_win.h @@ -161,6 +161,9 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) { // do anything on some platforms. int SetDiffServCodePoint(DiffServCodePoint dscp); + // Resets the thread to be used for thread-safety checks. + void DetachFromThread(); + private: enum SocketOptions { SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, |