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

Unified Diff: net/socket/socket_descriptor.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/socket/socket.h ('k') | net/socket/socket_descriptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_descriptor.h
diff --git a/net/socket/socket_descriptor.h b/net/socket/socket_descriptor.h
deleted file mode 100644
index b2a22234b800ff2d21e0f3fcd3552e902611007e..0000000000000000000000000000000000000000
--- a/net/socket/socket_descriptor.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_SOCKET_SOCKET_DESCRIPTOR_H_
-#define NET_SOCKET_SOCKET_DESCRIPTOR_H_
-
-#include "build/build_config.h"
-#include "net/base/net_export.h"
-
-#if defined(OS_WIN)
-#include <winsock2.h>
-#endif // OS_WIN
-
-namespace net {
-
-#if defined(OS_POSIX)
-typedef int SocketDescriptor;
-const SocketDescriptor kInvalidSocket = -1;
-#elif defined(OS_WIN)
-typedef SOCKET SocketDescriptor;
-const SocketDescriptor kInvalidSocket = INVALID_SOCKET;
-#endif
-
-// Interface to create native socket.
-// Usually such factories are used for testing purposes, which is not true in
-// this case. This interface is used to substitute WSASocket/socket to make
-// possible execution of some network code in sandbox.
-class NET_EXPORT PlatformSocketFactory {
- public:
- PlatformSocketFactory();
- virtual ~PlatformSocketFactory();
-
- // Replace WSASocket/socket with given factory. The factory will be used by
- // CreatePlatformSocket.
- static void SetInstance(PlatformSocketFactory* factory);
-
- // Creates socket. See WSASocket/socket documentation of parameters.
- virtual SocketDescriptor CreateSocket(int family, int type, int protocol) = 0;
-};
-
-// Creates socket. See WSASocket/socket documentation of parameters.
-SocketDescriptor NET_EXPORT CreatePlatformSocket(int family,
- int type,
- int protocol);
-
-} // namespace net
-
-#endif // NET_SOCKET_SOCKET_DESCRIPTOR_H_
« no previous file with comments | « net/socket/socket.h ('k') | net/socket/socket_descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698