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

Unified Diff: content/public/browser/socket_permission_request.h

Issue 10993078: Use extensions socket permission for TCP/UDP socket APIs in Pepper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove duplication Created 8 years, 2 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
Index: content/public/browser/socket_permission_request.h
diff --git a/content/public/browser/socket_permission_request.h b/content/public/browser/socket_permission_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..d7d15e44361e1595f974c4d74d4dd57ca167b923
--- /dev/null
+++ b/content/public/browser/socket_permission_request.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_SOCKET_PERMISSION_REQUEST_H_
+#define CONTENT_PUBLIC_BROWSER_SOCKET_PERMISSION_REQUEST_H_
+
+#include <string>
+
+namespace content {
+
+// This module provides helper types for checking socket permission.
+
+struct SocketPermissionRequest {
+ enum OperationType {
+ NONE = 0,
+ TCP_CONNECT,
+ TCP_LISTEN,
+ UDP_BIND,
+ UDP_SEND_TO,
+ };
+
+ SocketPermissionRequest(OperationType type,
+ const std::string& host,
+ int port)
+ : type(type),
+ host(host),
+ port(port) {
+ }
+
+ OperationType type;
+ std::string host;
+ int port;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_SOCKET_PERMISSION_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698