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

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

Issue 795543002: Added PermissionIDSet to APIPermissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permissions_patch_1_static_initializer_fix
Patch Set: Rebase Created 6 years 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 10 matching lines...) Expand all
21 const std::string& host, 21 const std::string& host,
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 // Returns the localized permission messages of this permission. 32 // Returns the localized permission messages of this permission.
32 PermissionMessages GetMessages() const override; 33 PermissionMessages GetMessages() const override;
33 34
34 private: 35 private:
35 bool AddAnyHostMessage(PermissionMessages& messages) const; 36 // Add all host messages for this manifest permission into the given lists.
36 void AddSubdomainHostMessage(PermissionMessages& messages) const; 37 // TODO(sashab): Remove the |messages| argument from these methods, and remove
37 void AddSpecificHostMessage(PermissionMessages& messages) const; 38 // the AddAllHostMessages() function (move all the logic into GetPermissions()
38 void AddNetworkListMessage(PermissionMessages& messages) const; 39 // above).
40 void AddAllHostMessages(PermissionMessages& messages,
41 PermissionIDSet& ids) const;
42
43 bool AddAnyHostMessage(PermissionMessages& messages,
44 PermissionIDSet& ids) const;
45 void AddSubdomainHostMessage(PermissionMessages& messages,
46 PermissionIDSet& ids) const;
47 void AddSpecificHostMessage(PermissionMessages& messages,
48 PermissionIDSet& ids) const;
49 void AddNetworkListMessage(PermissionMessages& messages,
50 PermissionIDSet& ids) const;
39 }; 51 };
40 52
41 } // namespace extensions 53 } // namespace extensions
42 54
43 #endif // EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_ 55 #endif // EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_
OLDNEW
« no previous file with comments | « extensions/common/permissions/settings_override_permission.cc ('k') | extensions/common/permissions/socket_permission.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698