Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PERMISSIONS_API_HELPERS_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PERMISSIONS_API_HELPERS_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/memory/ref_counted.h" | |
| 12 | |
| 13 namespace base { | |
| 14 class DictionaryValue; | |
| 15 } | |
| 16 class ExtensionPermissionSet; | |
| 17 | |
| 18 namespace extension_permissions_api { | |
|
Aaron Boodman
2011/12/14 01:00:14
I'd prefer extensions::permissions_api::Pack... fo
jstritar
2012/01/04 21:53:32
Done.
| |
| 19 | |
| 20 // Converts the permission |set| to a dictionary value. | |
| 21 base::DictionaryValue* PackPermissionsToValue( | |
| 22 const ExtensionPermissionSet* set); | |
| 23 | |
| 24 // Converts the |value| to a permission set. | |
| 25 bool UnpackPermissionsFromValue(base::DictionaryValue* value, | |
|
Aaron Boodman
2011/12/14 01:00:14
These functions seem like the kind of thing that w
jstritar
2012/01/04 21:53:32
Done.
| |
| 26 scoped_refptr<ExtensionPermissionSet>* ptr, | |
| 27 bool* bad_message, | |
| 28 std::string* error); | |
| 29 | |
| 30 } // namespace extensions_permissions_api | |
| 31 | |
| 32 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PERMISSIONS_API_HELPERS_H__ | |
| OLD | NEW |