| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Add new states here as this enum is stored in prefs. |
| 73 NUM_STATES | 73 NUM_STATES |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // Used to record the reason an extension was disabled. | |
| 77 enum DeprecatedDisableReason { | |
| 78 DEPRECATED_DISABLE_UNKNOWN, | |
| 79 DEPRECATED_DISABLE_USER_ACTION, | |
| 80 DEPRECATED_DISABLE_PERMISSIONS_INCREASE, | |
| 81 DEPRECATED_DISABLE_RELOAD, | |
| 82 DEPRECATED_DISABLE_LAST, // Not used. | |
| 83 }; | |
| 84 | |
| 85 // Reasons an extension may be disabled. These are used in histograms, so do | 76 // Reasons an extension may be disabled. These are used in histograms, so do |
| 86 // not remove/reorder entries - only add at the end just before | 77 // not remove/reorder entries - only add at the end just before |
| 87 // DISABLE_REASON_LAST (and update the shift value for it). Also remember to | 78 // DISABLE_REASON_LAST (and update the shift value for it). Also remember to |
| 88 // update the enum listing in tools/metrics/histograms.xml. | 79 // update the enum listing in tools/metrics/histograms.xml. |
| 89 // Also carefully consider if your reason should sync to other devices, and if | 80 // Also carefully consider if your reason should sync to other devices, and if |
| 90 // so, add it to kKnownSyncableDisableReasons in extension_sync_service.cc. | 81 // so, add it to kKnownSyncableDisableReasons in extension_sync_service.cc. |
| 91 enum DisableReason { | 82 enum DisableReason { |
| 92 DISABLE_NONE = 0, | 83 DISABLE_NONE = 0, |
| 93 DISABLE_USER_ACTION = 1 << 0, | 84 DISABLE_USER_ACTION = 1 << 0, |
| 94 DISABLE_PERMISSIONS_INCREASE = 1 << 1, | 85 DISABLE_PERMISSIONS_INCREASE = 1 << 1, |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 const PermissionSet& permissions; | 573 const PermissionSet& permissions; |
| 583 | 574 |
| 584 UpdatedExtensionPermissionsInfo(const Extension* extension, | 575 UpdatedExtensionPermissionsInfo(const Extension* extension, |
| 585 const PermissionSet& permissions, | 576 const PermissionSet& permissions, |
| 586 Reason reason); | 577 Reason reason); |
| 587 }; | 578 }; |
| 588 | 579 |
| 589 } // namespace extensions | 580 } // namespace extensions |
| 590 | 581 |
| 591 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 582 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
| OLD | NEW |