Chromium Code Reviews| Index: chrome/browser/extensions/extension_permissions_api_helpers.h |
| diff --git a/chrome/browser/extensions/extension_permissions_api_helpers.h b/chrome/browser/extensions/extension_permissions_api_helpers.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..97e4789c6775202aa241d770298d6ee467b674b1 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/extension_permissions_api_helpers.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PERMISSIONS_API_HELPERS_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_PERMISSIONS_API_HELPERS_H_ |
| +#pragma once |
| + |
| +#include <string> |
| + |
| +#include "base/memory/ref_counted.h" |
| + |
| +namespace base { |
| +class DictionaryValue; |
| +} |
| +class ExtensionPermissionSet; |
| + |
| +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.
|
| + |
| +// Converts the permission |set| to a dictionary value. |
| +base::DictionaryValue* PackPermissionsToValue( |
| + const ExtensionPermissionSet* set); |
| + |
| +// Converts the |value| to a permission set. |
| +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.
|
| + scoped_refptr<ExtensionPermissionSet>* ptr, |
| + bool* bad_message, |
| + std::string* error); |
| + |
| +} // namespace extensions_permissions_api |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PERMISSIONS_API_HELPERS_H__ |