[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 | |
Bettina Dea | 7264a04b6 | 2018-04-06 04:27:45 | [diff] [blame] | 31 | UNINSTALL_REASON_CHROME_WEBSTORE, |
| 32 | |
asargent | 8380bd39 | 2016-03-21 23:47:33 | [diff] [blame] | 33 | UNINSTALL_REASON_MAX, // Should always be the last value |
[email protected] | e43c61f | 2014-07-20 21:46:34 | [diff] [blame] | 34 | }; |
| 35 | |
Bettina Dea | 7264a04b6 | 2018-04-06 04:27:45 | [diff] [blame] | 36 | // The source of an uninstall. Do *NOT* reorder or delete any of the named |
| 37 | // values, as they are used in UMA. Put all new values above |
| 38 | // NUM_UNINSTALL_SOURCES. |
rdevlin.cronin | e18eb8cd | 2015-07-16 16:31:28 | [diff] [blame] | 39 | enum UninstallSource { |
| 40 | UNINSTALL_SOURCE_FOR_TESTING, |
| 41 | UNINSTALL_SOURCE_TOOLBAR_CONTEXT_MENU, |
| 42 | UNINSTALL_SOURCE_PERMISSIONS_INCREASE, |
| 43 | UNINSTALL_SOURCE_STORAGE_THRESHOLD_EXCEEDED, |
| 44 | UNINSTALL_SOURCE_APP_LIST, |
| 45 | UNINSTALL_SOURCE_APP_INFO_DIALOG, |
| 46 | UNINSTALL_SOURCE_CHROME_APPS_PAGE, |
| 47 | UNINSTALL_SOURCE_CHROME_EXTENSIONS_PAGE, |
| 48 | UNINSTALL_SOURCE_EXTENSION, |
Bettina Dea | 7264a04b6 | 2018-04-06 04:27:45 | [diff] [blame] | 49 | UNINSTALL_SOURCE_CHROME_WEBSTORE, |
Alan Cutter | a0ec9e44 | 2018-08-27 01:18:06 | [diff] [blame^] | 50 | UNINSTALL_SOURCE_HOSTED_APP_MENU, |
rdevlin.cronin | e18eb8cd | 2015-07-16 16:31:28 | [diff] [blame] | 51 | NUM_UNINSTALL_SOURCES, |
| 52 | }; |
| 53 | |
limasdf | d70dc5ae | 2014-09-13 00:02:22 | [diff] [blame] | 54 | } // namespace extensions |
[email protected] | e43c61f | 2014-07-20 21:46:34 | [diff] [blame] | 55 | |
| 56 | #endif // EXTENSIONS_BROWSER_UNINSTALL_REASON_H_ |