| OLD | NEW |
| 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 | 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_SET_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_SET_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_SET_H_ | 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_SET_H_ |
| 7 | 7 |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // next permission if invalid data is detected. If |error| is not NULL, it | 155 // next permission if invalid data is detected. If |error| is not NULL, it |
| 156 // will be set to an error message and false is returned when an invalid | 156 // will be set to an error message and false is returned when an invalid |
| 157 // permission is found. | 157 // permission is found. |
| 158 static bool ParseFromJSON( | 158 static bool ParseFromJSON( |
| 159 const base::ListValue* permissions, | 159 const base::ListValue* permissions, |
| 160 ParseSource source, | 160 ParseSource source, |
| 161 APIPermissionSet* api_permissions, | 161 APIPermissionSet* api_permissions, |
| 162 string16* error, | 162 string16* error, |
| 163 std::vector<std::string>* unhandled_permissions); | 163 std::vector<std::string>* unhandled_permissions); |
| 164 | 164 |
| 165 void AddImpliedPermissions(); |
| 166 |
| 165 private: | 167 private: |
| 166 APIPermissionMap map_; | 168 APIPermissionMap map_; |
| 167 }; | 169 }; |
| 168 | 170 |
| 169 } // namespace extensions | 171 } // namespace extensions |
| 170 | 172 |
| 171 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_SET_H_ | 173 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_SET_H_ |
| OLD | NEW |