| OLD | NEW |
| 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_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_SET_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_SET_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_SET_H_ | 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_SET_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/singleton.h" | 15 #include "base/memory/singleton.h" |
| 16 #include "base/string16.h" | 16 #include "base/string16.h" |
| 17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
| 18 #include "chrome/common/extensions/permissions/api_permission.h" | 18 #include "chrome/common/extensions/permissions/api_permission.h" |
| 19 #include "chrome/common/extensions/permissions/api_permission_set.h" | 19 #include "chrome/common/extensions/permissions/api_permission_set.h" |
| 20 #include "chrome/common/extensions/permissions/permission_message.h" | 20 #include "chrome/common/extensions/permissions/permission_message.h" |
| 21 #include "chrome/common/extensions/url_pattern_set.h" | 21 #include "extensions/common/url_pattern_set.h" |
| 22 | 22 |
| 23 namespace extensions { | 23 namespace extensions { |
| 24 | 24 |
| 25 // The PermissionSet is an immutable class that encapsulates an | 25 // The PermissionSet is an immutable class that encapsulates an |
| 26 // extension's permissions. The class exposes set operations for combining and | 26 // extension's permissions. The class exposes set operations for combining and |
| 27 // manipulating the permissions. | 27 // manipulating the permissions. |
| 28 class PermissionSet | 28 class PermissionSet |
| 29 : public base::RefCountedThreadSafe<PermissionSet> { | 29 : public base::RefCountedThreadSafe<PermissionSet> { |
| 30 public: | 30 public: |
| 31 // Creates an empty permission set (e.g. default permissions). | 31 // Creates an empty permission set (e.g. default permissions). |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // TODO(jstritar): Rename to "user_script_hosts_"? | 192 // TODO(jstritar): Rename to "user_script_hosts_"? |
| 193 URLPatternSet scriptable_hosts_; | 193 URLPatternSet scriptable_hosts_; |
| 194 | 194 |
| 195 // The list of hosts this effectively grants access to. | 195 // The list of hosts this effectively grants access to. |
| 196 URLPatternSet effective_hosts_; | 196 URLPatternSet effective_hosts_; |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace extensions | 199 } // namespace extensions |
| 200 | 200 |
| 201 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_SET_H_ | 201 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_SET_H_ |
| OLD | NEW |