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

Side by Side Diff: chrome/common/extensions/permissions/socket_permission_data.h

Issue 12684008: Multicast socket API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase lkgr Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_SOCKET_PERMISSION_DATA_H_ 4 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_SOCKET_PERMISSION_DATA_H_
5 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_SOCKET_PERMISSION_DATA_H_ 5 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_SOCKET_PERMISSION_DATA_H_
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/common/extensions/permissions/api_permission.h" 10 #include "chrome/common/extensions/permissions/api_permission.h"
11 #include "content/public/common/socket_permission_request.h" 11 #include "content/public/common/socket_permission_request.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 // A pattern that can be used to match socket permission. 15 // A pattern that can be used to match socket permission.
16 // <socket-permission-pattern> 16 // <socket-permission-pattern>
17 // := <op> | 17 // := <op> |
18 // <op> ':' <host> | 18 // <op> ':' <host> |
19 // <op> ':' ':' <port> | 19 // <op> ':' ':' <port> |
20 // <op> ':' <host> ':' <port> 20 // <op> ':' <host> ':' <port> |
21 // 'udp-multicast-membership'
21 // <op> := 'tcp-connect' | 22 // <op> := 'tcp-connect' |
22 // 'tcp-listen' | 23 // 'tcp-listen' |
23 // 'udp-bind' | 24 // 'udp-bind' |
24 // 'udp-send-to' 25 // 'udp-send-to'
25 // <host> := '*' | 26 // <host> := '*' |
26 // '*.' <anychar except '/' and '*'>+ | 27 // '*.' <anychar except '/' and '*'>+ |
27 // <anychar except '/' and '*'>+ 28 // <anychar except '/' and '*'>+
28 // <port> := '*' | 29 // <port> := '*' |
29 // <port number between 0 and 65535>) 30 // <port number between 0 and 65535>)
31 // The multicast membership permission implies to a permission to any address.
scheib 2013/04/02 18:25:17 "The multicast membership permission implies a per
Bei Zhang 2013/04/05 00:38:59 Done.
30 class SocketPermissionData { 32 class SocketPermissionData {
31 public: 33 public:
32 enum HostType { 34 enum HostType {
33 ANY_HOST, 35 ANY_HOST,
34 HOSTS_IN_DOMAINS, 36 HOSTS_IN_DOMAINS,
35 SPECIFIC_HOSTS, 37 SPECIFIC_HOSTS,
36 }; 38 };
37 39
38 SocketPermissionData(); 40 SocketPermissionData();
39 ~SocketPermissionData(); 41 ~SocketPermissionData();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void Reset(); 78 void Reset();
77 79
78 content::SocketPermissionRequest pattern_; 80 content::SocketPermissionRequest pattern_;
79 bool match_subdomains_; 81 bool match_subdomains_;
80 mutable std::string spec_; 82 mutable std::string spec_;
81 }; 83 };
82 84
83 } // namespace extensions 85 } // namespace extensions
84 86
85 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_SOCKET_PERMISSION_DATA_H_ 87 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_SOCKET_PERMISSION_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698