| OLD | NEW |
| 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_EXTENSION_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_ |
| 6 #define EXTENSIONS_COMMON_EXTENSION_H_ | 6 #define EXTENSIONS_COMMON_EXTENSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 const Extension* extension; | 535 const Extension* extension; |
| 536 | 536 |
| 537 UnloadedExtensionInfo(const Extension* extension, Reason reason); | 537 UnloadedExtensionInfo(const Extension* extension, Reason reason); |
| 538 }; | 538 }; |
| 539 | 539 |
| 540 // The details sent for EXTENSION_PERMISSIONS_UPDATED notifications. | 540 // The details sent for EXTENSION_PERMISSIONS_UPDATED notifications. |
| 541 struct UpdatedExtensionPermissionsInfo { | 541 struct UpdatedExtensionPermissionsInfo { |
| 542 enum Reason { | 542 enum Reason { |
| 543 ADDED, // The permissions were added to the extension. | 543 ADDED, // The permissions were added to the extension. |
| 544 REMOVED, // The permissions were removed from the extension. | 544 REMOVED, // The permissions were removed from the extension. |
| 545 POLICY, // The policy that affects permissions was updated. | |
| 546 }; | 545 }; |
| 547 | 546 |
| 548 Reason reason; | 547 Reason reason; |
| 549 | 548 |
| 550 // The extension who's permissions have changed. | 549 // The extension who's permissions have changed. |
| 551 const Extension* extension; | 550 const Extension* extension; |
| 552 | 551 |
| 553 // The permissions that have changed. For Reason::ADDED, this would contain | 552 // The permissions that have changed. For Reason::ADDED, this would contain |
| 554 // only the permissions that have added, and for Reason::REMOVED, this would | 553 // only the permissions that have added, and for Reason::REMOVED, this would |
| 555 // only contain the removed permissions. | 554 // only contain the removed permissions. |
| 556 const PermissionSet& permissions; | 555 const PermissionSet& permissions; |
| 557 | 556 |
| 558 UpdatedExtensionPermissionsInfo(const Extension* extension, | 557 UpdatedExtensionPermissionsInfo(const Extension* extension, |
| 559 const PermissionSet& permissions, | 558 const PermissionSet& permissions, |
| 560 Reason reason); | 559 Reason reason); |
| 561 }; | 560 }; |
| 562 | 561 |
| 563 } // namespace extensions | 562 } // namespace extensions |
| 564 | 563 |
| 565 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 564 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
| OLD | NEW |