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

Side by Side Diff: extensions/common/permissions/socket_permission.h

Issue 1213623006: Extensions: Remove PermissionMessage (permission_message.h/cc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kill_getmessages
Patch Set: fix app_shell build, rebase Created 5 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 4
5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_ 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_ 6 #define EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "extensions/common/permissions/api_permission.h" 10 #include "extensions/common/permissions/api_permission.h"
(...skipping 11 matching lines...) Expand all
22 uint16 port) 22 uint16 port)
23 : request(type, host, port) {} 23 : request(type, host, port) {}
24 content::SocketPermissionRequest request; 24 content::SocketPermissionRequest request;
25 }; 25 };
26 26
27 explicit SocketPermission(const APIPermissionInfo* info); 27 explicit SocketPermission(const APIPermissionInfo* info);
28 28
29 ~SocketPermission() override; 29 ~SocketPermission() override;
30 30
31 PermissionIDSet GetPermissions() const override; 31 PermissionIDSet GetPermissions() const override;
32
33 private:
34 // Add all host messages for this manifest permission into the given lists.
35 // TODO(sashab): Remove the |messages| argument from these methods, and remove
36 // the AddAllHostMessages() function (move all the logic into GetPermissions()
37 // above).
38 void AddAllHostMessages(PermissionMessages& messages,
39 PermissionIDSet& ids) const;
40
41 bool AddAnyHostMessage(PermissionMessages& messages,
42 PermissionIDSet& ids) const;
43 void AddSubdomainHostMessage(PermissionMessages& messages,
44 PermissionIDSet& ids) const;
45 void AddSpecificHostMessage(PermissionMessages& messages,
46 PermissionIDSet& ids) const;
47 void AddNetworkListMessage(PermissionMessages& messages,
48 PermissionIDSet& ids) const;
49 }; 32 };
50 33
51 } // namespace extensions 34 } // namespace extensions
52 35
53 #endif // EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_ 36 #endif // EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_
OLDNEW
« no previous file with comments | « extensions/common/permissions/permissions_info.h ('k') | extensions/common/permissions/socket_permission.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698