OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_API_PERMISSION_SET_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_SET_H_ |
6 #define EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_SET_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_SET_H_ |
7 | 7 |
8 | 8 |
9 #include "extensions/common/permissions/api_permission.h" | 9 #include "extensions/common/permissions/api_permission.h" |
10 #include "extensions/common/permissions/base_set_operators.h" | 10 #include "extensions/common/permissions/base_set_operators.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // permissions with kFlagInternal as errors. If |unhandled_permissions| is | 47 // permissions with kFlagInternal as errors. If |unhandled_permissions| is |
48 // not NULL, the names of all permissions that couldn't be parsed will be | 48 // not NULL, the names of all permissions that couldn't be parsed will be |
49 // added to this vector. If |error| is NULL, parsing will continue with the | 49 // added to this vector. If |error| is NULL, parsing will continue with the |
50 // next permission if invalid data is detected. If |error| is not NULL, it | 50 // next permission if invalid data is detected. If |error| is not NULL, it |
51 // will be set to an error message and false is returned when an invalid | 51 // will be set to an error message and false is returned when an invalid |
52 // permission is found. | 52 // permission is found. |
53 static bool ParseFromJSON( | 53 static bool ParseFromJSON( |
54 const base::ListValue* permissions, | 54 const base::ListValue* permissions, |
55 ParseSource source, | 55 ParseSource source, |
56 APIPermissionSet* api_permissions, | 56 APIPermissionSet* api_permissions, |
57 string16* error, | 57 base::string16* error, |
58 std::vector<std::string>* unhandled_permissions); | 58 std::vector<std::string>* unhandled_permissions); |
59 | 59 |
60 void AddImpliedPermissions(); | 60 void AddImpliedPermissions(); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace extensions | 63 } // namespace extensions |
64 | 64 |
65 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_SET_H_ | 65 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_SET_H_ |
OLD | NEW |