Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: chrome/browser/extensions/api/permissions/permissions_api_helpers.h

Issue 1349613003: [Extensions] Un-refcount PermissionSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 11
12 namespace base { 12 namespace base {
13 class DictionaryValue; 13 class DictionaryValue;
14 } 14 }
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 class PermissionSet; 18 class PermissionSet;
19 19
20 namespace api { 20 namespace api {
21 namespace permissions { 21 namespace permissions {
22 struct Permissions; 22 struct Permissions;
23 } 23 }
24 } 24 }
25 25
26 namespace permissions_api_helpers { 26 namespace permissions_api_helpers {
27 27
28 // Converts the permission |set| to a permissions object. 28 // Converts the permission |set| to a permissions object.
29 scoped_ptr<api::permissions::Permissions> PackPermissionSet( 29 scoped_ptr<api::permissions::Permissions> PackPermissionSet(
30 const PermissionSet* set); 30 const PermissionSet* set);
not at google - send to devlin 2015/09/22 21:51:26 (noting place which should be a reference)
31 31
32 // Creates a permission set from |permissions|. Returns NULL if the permissions 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. 33 // cannot be converted to a permission set, in which case |error| will be set.
34 scoped_refptr<const PermissionSet> UnpackPermissionSet( 34 scoped_ptr<const PermissionSet> UnpackPermissionSet(
35 const api::permissions::Permissions& permissions, 35 const api::permissions::Permissions& permissions,
36 bool allow_file_access, 36 bool allow_file_access,
37 std::string* error); 37 std::string* error);
38 38
39 } // namespace permissions_api_helpers 39 } // namespace permissions_api_helpers
40 } // namespace extensions 40 } // namespace extensions
41 41
42 #endif // CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_ 42 #endif // CHROME_BROWSER_EXTENSIONS_API_PERMISSIONS_PERMISSIONS_API_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698