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

Side by Side Diff: extensions/common/manifest_handlers/permissions_parser.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_COMMON_MANIFEST_HANDLERS_PERMISSIONS_PARSER_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_PERMISSIONS_PARSER_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_PERMISSIONS_PARSER_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_PERMISSIONS_PARSER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "extensions/common/permissions/api_permission.h" 10 #include "extensions/common/permissions/api_permission.h"
(...skipping 27 matching lines...) Expand all
38 APIPermission::ID permission); 38 APIPermission::ID permission);
39 static void AddAPIPermission(Extension* extension, APIPermission* permission); 39 static void AddAPIPermission(Extension* extension, APIPermission* permission);
40 static bool HasAPIPermission(const Extension* extension, 40 static bool HasAPIPermission(const Extension* extension,
41 APIPermission::ID permission); 41 APIPermission::ID permission);
42 static void SetScriptableHosts(Extension* extension, 42 static void SetScriptableHosts(Extension* extension,
43 const URLPatternSet& scriptable_hosts); 43 const URLPatternSet& scriptable_hosts);
44 44
45 // Return the extension's manifest-specified permissions. In no cases should 45 // Return the extension's manifest-specified permissions. In no cases should
46 // these permissions be used to determine if an action is allowed. Instead, 46 // these permissions be used to determine if an action is allowed. Instead,
47 // use PermissionsData. 47 // use PermissionsData.
48 static scoped_refptr<const PermissionSet> GetRequiredPermissions( 48 static const PermissionSet* GetRequiredPermissions(
not at google - send to devlin 2015/09/22 21:51:26 (noting place which should be a reference)
49 const Extension* extension); 49 const Extension* extension);
50 static scoped_refptr<const PermissionSet> GetOptionalPermissions( 50 static const PermissionSet* GetOptionalPermissions(
51 const Extension* extension); 51 const Extension* extension);
52 52
53 private: 53 private:
54 struct InitialPermissions; 54 struct InitialPermissions;
55 55
56 // The initial permissions for the extension, which can still be modified. 56 // The initial permissions for the extension, which can still be modified.
57 scoped_ptr<InitialPermissions> initial_required_permissions_; 57 scoped_ptr<InitialPermissions> initial_required_permissions_;
58 scoped_ptr<InitialPermissions> initial_optional_permissions_; 58 scoped_ptr<InitialPermissions> initial_optional_permissions_;
59 }; 59 };
60 60
61 } // namespace extensions 61 } // namespace extensions
62 62
63 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_PERMISSIONS_PARSER_H_ 63 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_PERMISSIONS_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698