[email protected] | e43c61f | 2014-07-20 21:46:34 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef EXTENSIONS_BROWSER_UNINSTALL_REASON_H_ |
| 6 | #define EXTENSIONS_BROWSER_UNINSTALL_REASON_H_ |
| 7 | |
| 8 | namespace extensions { |
| 9 | |
asargent | 8380bd39 | 2016-03-21 23:47:33 | [diff] [blame] | 10 | // Do not remove/reorder these, as they are used in uninstall ping data and we |
| 11 | // depend on their values being stable. |
[email protected] | e43c61f | 2014-07-20 21:46:34 | [diff] [blame] | 12 | enum UninstallReason { |
| 13 | UNINSTALL_REASON_FOR_TESTING, // Used for testing code only |
| 14 | UNINSTALL_REASON_USER_INITIATED, // User performed some UI gesture |
| 15 | UNINSTALL_REASON_EXTENSION_DISABLED, // Extension disabled due to error |
| 16 | UNINSTALL_REASON_STORAGE_THRESHOLD_EXCEEDED, |
| 17 | UNINSTALL_REASON_INSTALL_CANCELED, |
| 18 | UNINSTALL_REASON_MANAGEMENT_API, |
| 19 | UNINSTALL_REASON_SYNC, |
| 20 | UNINSTALL_REASON_ORPHANED_THEME, |
| 21 | UNINSTALL_REASON_ORPHANED_EPHEMERAL_EXTENSION, |
| 22 | // The entries below imply bypassing checking user has permission to |
| 23 | // uninstall the corresponding extension id. |
| 24 | UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION, |
| 25 | UNINSTALL_REASON_ORPHANED_SHARED_MODULE, |
rdevlin.cronin | 5f6b69d | 2014-09-20 01:23:35 | [diff] [blame] | 26 | UNINSTALL_REASON_INTERNAL_MANAGEMENT, // Internal extensions (see usages) |
dtseng | 9fb3d5b | 2015-02-23 17:24:17 | [diff] [blame] | 27 | UNINSTALL_REASON_REINSTALL, |
| 28 | UNINSTALL_REASON_COMPONENT_REMOVED, |
Takumi Fujimoto | 43c8c00f | 2017-07-26 22:48:56 | [diff] [blame^] | 29 | UNINSTALL_REASON_MIGRATED, // Migrated to component extensions |
asargent | 8380bd39 | 2016-03-21 23:47:33 | [diff] [blame] | 30 | |
| 31 | UNINSTALL_REASON_MAX, // Should always be the last value |
[email protected] | e43c61f | 2014-07-20 21:46:34 | [diff] [blame] | 32 | }; |
| 33 | |
rdevlin.cronin | e18eb8cd | 2015-07-16 16:31:28 | [diff] [blame] | 34 | // The source of an uninstall. Do *NOT* adjust the order of these, as they are |
| 35 | // used in UMA. |
| 36 | enum UninstallSource { |
| 37 | UNINSTALL_SOURCE_FOR_TESTING, |
| 38 | UNINSTALL_SOURCE_TOOLBAR_CONTEXT_MENU, |
| 39 | UNINSTALL_SOURCE_PERMISSIONS_INCREASE, |
| 40 | UNINSTALL_SOURCE_STORAGE_THRESHOLD_EXCEEDED, |
| 41 | UNINSTALL_SOURCE_APP_LIST, |
| 42 | UNINSTALL_SOURCE_APP_INFO_DIALOG, |
| 43 | UNINSTALL_SOURCE_CHROME_APPS_PAGE, |
| 44 | UNINSTALL_SOURCE_CHROME_EXTENSIONS_PAGE, |
| 45 | UNINSTALL_SOURCE_EXTENSION, |
| 46 | NUM_UNINSTALL_SOURCES, |
| 47 | }; |
| 48 | |
limasdf | d70dc5ae | 2014-09-13 00:02:22 | [diff] [blame] | 49 | } // namespace extensions |
[email protected] | e43c61f | 2014-07-20 21:46:34 | [diff] [blame] | 50 | |
| 51 | #endif // EXTENSIONS_BROWSER_UNINSTALL_REASON_H_ |