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

Side by Side Diff: extensions/common/permissions/permissions_data.h

Issue 884903003: [Extensions] Clean up some Permission[sData|Set] includes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_PERMISSIONS_PERMISSIONS_DATA_H_ 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
15 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
16 #include "extensions/common/extension.h"
17 #include "extensions/common/manifest.h" 15 #include "extensions/common/manifest.h"
18 #include "extensions/common/permissions/api_permission.h" 16 #include "extensions/common/permissions/api_permission.h"
19 #include "extensions/common/permissions/permission_message.h" 17 #include "extensions/common/permissions/permission_message.h"
20 #include "extensions/common/permissions/permission_set.h" 18 #include "extensions/common/permissions/permission_set.h"
21 19
22 class GURL; 20 class GURL;
23 21
24 namespace extensions { 22 namespace extensions {
25
26 class PermissionSet;
27 class Extension; 23 class Extension;
28 class URLPatternSet; 24 class URLPatternSet;
29 class UserScript;
30 25
31 // A container for the active permissions of an extension. 26 // A container for the permissions state of an extension, including active,
32 // TODO(rdevlin.cronin): For the love of everything good, rename this class to 27 // withheld, and tab-specific permissions.
33 // ActivePermissions. We do *not* need PermissionsParser, PermissionSet,
34 // PermissionInfo, and PermissionsData. No one will be able to keep them
35 // straight.
36 class PermissionsData { 28 class PermissionsData {
37 public: 29 public:
38 // The possible types of access for a given frame. 30 // The possible types of access for a given frame.
39 enum AccessType { 31 enum AccessType {
40 ACCESS_DENIED, // The extension is not allowed to access the given page. 32 ACCESS_DENIED, // The extension is not allowed to access the given page.
41 ACCESS_ALLOWED, // The extension is allowed to access the given page. 33 ACCESS_ALLOWED, // The extension is allowed to access the given page.
42 ACCESS_WITHHELD // The browser must determine if the extension can access 34 ACCESS_WITHHELD // The browser must determine if the extension can access
43 // the given page. 35 // the given page.
44 }; 36 };
45 37
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 mutable scoped_refptr<const PermissionSet> withheld_permissions_unsafe_; 260 mutable scoped_refptr<const PermissionSet> withheld_permissions_unsafe_;
269 261
270 mutable TabPermissionsMap tab_specific_permissions_; 262 mutable TabPermissionsMap tab_specific_permissions_;
271 263
272 DISALLOW_COPY_AND_ASSIGN(PermissionsData); 264 DISALLOW_COPY_AND_ASSIGN(PermissionsData);
273 }; 265 };
274 266
275 } // namespace extensions 267 } // namespace extensions
276 268
277 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ 269 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
OLDNEW
« no previous file with comments | « extensions/common/permissions/permission_set.cc ('k') | extensions/common/permissions/permissions_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698