Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / public / common / socket_permission_request.h
blob3db53b3699a6c2ba183d88685f8bf92fd396168e
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 #include "base/basictypes.h"
12 namespace content {
14 // This module provides helper types for checking socket permission.
16 struct SocketPermissionRequest {
17 enum OperationType {
18 NONE = 0,
19 TCP_CONNECT,
20 TCP_LISTEN,
21 UDP_BIND,
22 UDP_SEND_TO,
23 UDP_MULTICAST_MEMBERSHIP,
24 RESOLVE_HOST,
25 RESOLVE_PROXY,
26 NETWORK_STATE,
27 OPERATION_TYPE_LAST = NETWORK_STATE
30 SocketPermissionRequest(OperationType type,
31 const std::string& host,
32 uint16 port)
33 : type(type),
34 host(host),
35 port(port) {
38 OperationType type;
39 std::string host;
40 uint16 port;
43 } // namespace content
45 #endif // CONTENT_PUBLIC_COMMON_SOCKET_PERMISSION_REQUEST_H_