Save errno for logging before potentially overwriting it.
[chromium-blink-merge.git] / content / public / common / socket_permission_request.h
blob278880ea483e9126aac7f79e8c88bc011625eb16
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_SOCKET_PERMISSION_REQUEST_H_
6 #define CONTENT_PUBLIC_COMMON_SOCKET_PERMISSION_REQUEST_H_
8 #include <string>
10 namespace content {
12 // This module provides helper types for checking socket permission.
14 struct SocketPermissionRequest {
15 enum OperationType {
16 NONE = 0,
17 TCP_CONNECT,
18 TCP_LISTEN,
19 UDP_BIND,
20 UDP_SEND_TO,
21 UDP_MULTICAST_MEMBERSHIP,
22 RESOLVE_HOST,
23 RESOLVE_PROXY
26 SocketPermissionRequest(OperationType type,
27 const std::string& host,
28 int port)
29 : type(type),
30 host(host),
31 port(port) {
34 OperationType type;
35 std::string host;
36 int port;
39 } // namespace content
41 #endif // CONTENT_PUBLIC_COMMON_SOCKET_PERMISSION_REQUEST_H_