| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 enum State { | 63 enum State { |
| 64 DISABLED = 0, | 64 DISABLED = 0, |
| 65 ENABLED, | 65 ENABLED, |
| 66 // An external extension that the user uninstalled. We should not reinstall | 66 // An external extension that the user uninstalled. We should not reinstall |
| 67 // such extensions on startup. | 67 // such extensions on startup. |
| 68 EXTERNAL_EXTENSION_UNINSTALLED, | 68 EXTERNAL_EXTENSION_UNINSTALLED, |
| 69 // DEPRECATED: Special state for component extensions. | 69 // DEPRECATED: Special state for component extensions. |
| 70 // Maintained as a placeholder since states may be stored to disk. | 70 // Maintained as a placeholder since states may be stored to disk. |
| 71 ENABLED_COMPONENT_DEPRECATED, | 71 ENABLED_COMPONENT_DEPRECATED, |
| 72 // Add new states here as this enum is stored in prefs. |
| 72 NUM_STATES | 73 NUM_STATES |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 // Used to record the reason an extension was disabled. | 76 // Used to record the reason an extension was disabled. |
| 76 enum DeprecatedDisableReason { | 77 enum DeprecatedDisableReason { |
| 77 DEPRECATED_DISABLE_UNKNOWN, | 78 DEPRECATED_DISABLE_UNKNOWN, |
| 78 DEPRECATED_DISABLE_USER_ACTION, | 79 DEPRECATED_DISABLE_USER_ACTION, |
| 79 DEPRECATED_DISABLE_PERMISSIONS_INCREASE, | 80 DEPRECATED_DISABLE_PERMISSIONS_INCREASE, |
| 80 DEPRECATED_DISABLE_RELOAD, | 81 DEPRECATED_DISABLE_RELOAD, |
| 81 DEPRECATED_DISABLE_LAST, // Not used. | 82 DEPRECATED_DISABLE_LAST, // Not used. |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 struct UnloadedExtensionInfo { | 533 struct UnloadedExtensionInfo { |
| 533 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver. | 534 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver. |
| 534 enum Reason { | 535 enum Reason { |
| 535 REASON_UNDEFINED, // Undefined state used to initialize variables. | 536 REASON_UNDEFINED, // Undefined state used to initialize variables. |
| 536 REASON_DISABLE, // Extension is being disabled. | 537 REASON_DISABLE, // Extension is being disabled. |
| 537 REASON_UPDATE, // Extension is being updated to a newer version. | 538 REASON_UPDATE, // Extension is being updated to a newer version. |
| 538 REASON_UNINSTALL, // Extension is being uninstalled. | 539 REASON_UNINSTALL, // Extension is being uninstalled. |
| 539 REASON_TERMINATE, // Extension has terminated. | 540 REASON_TERMINATE, // Extension has terminated. |
| 540 REASON_BLACKLIST, // Extension has been blacklisted. | 541 REASON_BLACKLIST, // Extension has been blacklisted. |
| 541 REASON_PROFILE_SHUTDOWN, // Profile is being shut down. | 542 REASON_PROFILE_SHUTDOWN, // Profile is being shut down. |
| 543 REASON_LOCK_ALL, // All extensions for the profile are blocked. |
| 542 }; | 544 }; |
| 543 | 545 |
| 544 Reason reason; | 546 Reason reason; |
| 545 | 547 |
| 546 // The extension being unloaded - this should always be non-NULL. | 548 // The extension being unloaded - this should always be non-NULL. |
| 547 const Extension* extension; | 549 const Extension* extension; |
| 548 | 550 |
| 549 UnloadedExtensionInfo(const Extension* extension, Reason reason); | 551 UnloadedExtensionInfo(const Extension* extension, Reason reason); |
| 550 }; | 552 }; |
| 551 | 553 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 568 | 570 |
| 569 UpdatedExtensionPermissionsInfo( | 571 UpdatedExtensionPermissionsInfo( |
| 570 const Extension* extension, | 572 const Extension* extension, |
| 571 const PermissionSet* permissions, | 573 const PermissionSet* permissions, |
| 572 Reason reason); | 574 Reason reason); |
| 573 }; | 575 }; |
| 574 | 576 |
| 575 } // namespace extensions | 577 } // namespace extensions |
| 576 | 578 |
| 577 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 579 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
| OLD | NEW |