| 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_SET_DISJUNCTION_PERMISSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_SET_DISJUNCTION_PERMISSION_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_SET_DISJUNCTION_PERMISSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_SET_DISJUNCTION_PERMISSION_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/common/extensions/extension_messages.h" | 14 #include "extensions/common/extension_messages.h" |
| 15 #include "extensions/common/permissions/api_permission.h" | 15 #include "extensions/common/permissions/api_permission.h" |
| 16 #include "ipc/ipc_message.h" | 16 #include "ipc/ipc_message.h" |
| 17 #include "ipc/ipc_message_utils.h" | 17 #include "ipc/ipc_message_utils.h" |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 | 20 |
| 21 // An abstract base class for permissions that are represented by the | 21 // An abstract base class for permissions that are represented by the |
| 22 // disjunction of a set of conditions. Each condition is represented by a | 22 // disjunction of a set of conditions. Each condition is represented by a |
| 23 // |PermissionDataType| (e.g. SocketPermissionData). If an | 23 // |PermissionDataType| (e.g. SocketPermissionData). If an |
| 24 // APIPermission::CheckParam matches any of the conditions in the set, the | 24 // APIPermission::CheckParam matches any of the conditions in the set, the |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 IPC::LogParam(data_set_, log); | 161 IPC::LogParam(data_set_, log); |
| 162 } | 162 } |
| 163 | 163 |
| 164 protected: | 164 protected: |
| 165 std::set<PermissionDataType> data_set_; | 165 std::set<PermissionDataType> data_set_; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace extensions | 168 } // namespace extensions |
| 169 | 169 |
| 170 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_SET_DISJUNCTION_PERMISSION_H_ | 170 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_SET_DISJUNCTION_PERMISSION_H_ |
| OLD | NEW |