| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 const std::string& extension_id) const OVERRIDE; | 335 const std::string& extension_id) const OVERRIDE; |
| 336 virtual bool IsExternalExtensionUninstalled( | 336 virtual bool IsExternalExtensionUninstalled( |
| 337 const std::string& extension_id) const OVERRIDE; | 337 const std::string& extension_id) const OVERRIDE; |
| 338 | 338 |
| 339 // Enables the extension. If the extension is already enabled, does | 339 // Enables the extension. If the extension is already enabled, does |
| 340 // nothing. | 340 // nothing. |
| 341 virtual void EnableExtension(const std::string& extension_id); | 341 virtual void EnableExtension(const std::string& extension_id); |
| 342 | 342 |
| 343 // Disables the extension. If the extension is already disabled, or | 343 // Disables the extension. If the extension is already disabled, or |
| 344 // cannot be disabled, does nothing. | 344 // cannot be disabled, does nothing. |
| 345 virtual void DisableExtension(const std::string& extension_id); | 345 virtual void DisableExtension(const std::string& extension_id, |
| 346 Extension::DisableReason disable_reason); |
| 346 | 347 |
| 347 // Updates the |extension|'s granted permissions lists to include all | 348 // Updates the |extension|'s granted permissions lists to include all |
| 348 // permissions in the |extension|'s manifest and re-enables the | 349 // permissions in the |extension|'s manifest and re-enables the |
| 349 // extension. | 350 // extension. |
| 350 void GrantPermissionsAndEnableExtension(const Extension* extension); | 351 void GrantPermissionsAndEnableExtension(const Extension* extension); |
| 351 | 352 |
| 352 // Check for updates (or potentially new extensions from external providers) | 353 // Check for updates (or potentially new extensions from external providers) |
| 353 void CheckForExternalUpdates(); | 354 void CheckForExternalUpdates(); |
| 354 | 355 |
| 355 // Unload the specified extension. | 356 // Unload the specified extension. |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 845 scoped_ptr<ExtensionGlobalError> extension_global_error_; |
| 845 | 846 |
| 846 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 847 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 847 InstallAppsWithUnlimtedStorage); | 848 InstallAppsWithUnlimtedStorage); |
| 848 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 849 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 849 InstallAppsAndCheckStorageProtection); | 850 InstallAppsAndCheckStorageProtection); |
| 850 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 851 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 851 }; | 852 }; |
| 852 | 853 |
| 853 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 854 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |