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. |
545 }; | 546 }; |
546 | 547 |
547 Reason reason; | 548 Reason reason; |
548 | 549 |
549 // The extension who's permissions have changed. | 550 // The extension who's permissions have changed. |
550 const Extension* extension; | 551 const Extension* extension; |
551 | 552 |
552 // The permissions that have changed. For Reason::ADDED, this would contain | 553 // The permissions that have changed. For Reason::ADDED, this would contain |
553 // only the permissions that have added, and for Reason::REMOVED, this would | 554 // only the permissions that have added, and for Reason::REMOVED, this would |
554 // only contain the removed permissions. | 555 // only contain the removed permissions. |
555 const PermissionSet& permissions; | 556 const PermissionSet& permissions; |
556 | 557 |
557 UpdatedExtensionPermissionsInfo(const Extension* extension, | 558 UpdatedExtensionPermissionsInfo(const Extension* extension, |
558 const PermissionSet& permissions, | 559 const PermissionSet& permissions, |
559 Reason reason); | 560 Reason reason); |
560 }; | 561 }; |
561 | 562 |
562 } // namespace extensions | 563 } // namespace extensions |
563 | 564 |
564 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 565 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
OLD | NEW |