app_list: Re-enable people search.
[chromium-blink-merge.git] / chrome / browser / extensions / api / permissions / permissions_api_helpers.h
blob4c7b15934b448e2917f430c457a75a9c2a95e45d
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_
8 #include <string>
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/ref_counted.h"
12 namespace base {
13 class DictionaryValue;
16 namespace extensions {
18 class PermissionSet;
20 namespace api {
21 namespace permissions {
22 struct Permissions;
26 namespace permissions_api_helpers {
28 // Converts the permission |set| to a permissions object.
29 scoped_ptr<api::permissions::Permissions> PackPermissionSet(
30 const PermissionSet* set);
32 // Creates a permission set from |permissions|. Returns NULL if the permissions
33 // cannot be converted to a permission set, in which case |error| will be set.
34 scoped_refptr<PermissionSet> UnpackPermissionSet(
35 const api::permissions::Permissions& permissions,
36 bool allow_file_access,
37 std::string* error);
39 } // namespace permissions_api_helpers
40 } // namespace extensions
42 #endif // CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_