| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 UNINSTALL_REASON_STORAGE_THRESHOLD_EXCEEDED, | 162 UNINSTALL_REASON_STORAGE_THRESHOLD_EXCEEDED, |
| 163 UNINSTALL_REASON_INSTALL_CANCELED, | 163 UNINSTALL_REASON_INSTALL_CANCELED, |
| 164 UNINSTALL_REASON_MANAGEMENT_API, | 164 UNINSTALL_REASON_MANAGEMENT_API, |
| 165 UNINSTALL_REASON_SYNC, | 165 UNINSTALL_REASON_SYNC, |
| 166 UNINSTALL_REASON_ORPHANED_THEME, | 166 UNINSTALL_REASON_ORPHANED_THEME, |
| 167 UNINSTALL_REASON_ORPHANED_EPHEMERAL_EXTENSION, | 167 UNINSTALL_REASON_ORPHANED_EPHEMERAL_EXTENSION, |
| 168 // The entries below imply bypassing checking user has permission to | 168 // The entries below imply bypassing checking user has permission to |
| 169 // uninstall the corresponding extension id. | 169 // uninstall the corresponding extension id. |
| 170 UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION, | 170 UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION, |
| 171 UNINSTALL_REASON_ORPHANED_SHARED_MODULE, | 171 UNINSTALL_REASON_ORPHANED_SHARED_MODULE, |
| 172 UNINSTALL_REASON_INTERNAL_MANAGEMENT // Internal extensions (see usages) | 172 UNINSTALL_REASON_INTERNAL_MANAGEMENT, // Internal extensions (see usages) |
| 173 UNINSTALL_REASON_SYNC_BY_CUSTODIAN, |
| 173 }; | 174 }; |
| 174 | 175 |
| 175 // Attempts to uninstall an extension from a given ExtensionService. Returns | 176 // Attempts to uninstall an extension from a given ExtensionService. Returns |
| 176 // true iff the target extension exists. | 177 // true iff the target extension exists. |
| 177 static bool UninstallExtensionHelper(ExtensionService* extensions_service, | 178 static bool UninstallExtensionHelper(ExtensionService* extensions_service, |
| 178 const std::string& extension_id, | 179 const std::string& extension_id, |
| 179 UninstallReason reason); | 180 UninstallReason reason); |
| 180 | 181 |
| 181 // Constructor stores pointers to |profile| and |extension_prefs| but | 182 // Constructor stores pointers to |profile| and |extension_prefs| but |
| 182 // ownership remains at caller. | 183 // ownership remains at caller. |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 GreylistedExtensionDisabled); | 727 GreylistedExtensionDisabled); |
| 727 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 728 GreylistDontEnableManuallyDisabled); | 729 GreylistDontEnableManuallyDisabled); |
| 729 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 730 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 730 GreylistUnknownDontChange); | 731 GreylistUnknownDontChange); |
| 731 | 732 |
| 732 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 733 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 733 }; | 734 }; |
| 734 | 735 |
| 735 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 736 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |