| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 namespace extensions { | 46 namespace extensions { |
| 47 class ComponentLoader; | 47 class ComponentLoader; |
| 48 class CrxInstaller; | 48 class CrxInstaller; |
| 49 class ExtensionActionStorageManager; | 49 class ExtensionActionStorageManager; |
| 50 class ExtensionErrorController; | 50 class ExtensionErrorController; |
| 51 class ExtensionRegistry; | 51 class ExtensionRegistry; |
| 52 class ExtensionSystem; | 52 class ExtensionSystem; |
| 53 class ExtensionUpdater; | 53 class ExtensionUpdater; |
| 54 class OneShotEvent; | 54 class OneShotEvent; |
| 55 class ExternalInstallManager; | |
| 56 class SharedModuleService; | 55 class SharedModuleService; |
| 57 class UpdateObserver; | 56 class UpdateObserver; |
| 58 } // namespace extensions | 57 } // namespace extensions |
| 59 | 58 |
| 60 // This is an interface class to encapsulate the dependencies that | 59 // This is an interface class to encapsulate the dependencies that |
| 61 // various classes have on ExtensionService. This allows easy mocking. | 60 // various classes have on ExtensionService. This allows easy mocking. |
| 62 class ExtensionServiceInterface | 61 class ExtensionServiceInterface |
| 63 : public base::SupportsWeakPtr<ExtensionServiceInterface> { | 62 : public base::SupportsWeakPtr<ExtensionServiceInterface> { |
| 64 public: | 63 public: |
| 65 virtual ~ExtensionServiceInterface() {} | 64 virtual ~ExtensionServiceInterface() {} |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 extensions::ComponentLoader* component_loader() { | 380 extensions::ComponentLoader* component_loader() { |
| 382 return component_loader_.get(); | 381 return component_loader_.get(); |
| 383 } | 382 } |
| 384 | 383 |
| 385 bool browser_terminating() const { return browser_terminating_; } | 384 bool browser_terminating() const { return browser_terminating_; } |
| 386 | 385 |
| 387 extensions::SharedModuleService* shared_module_service() { | 386 extensions::SharedModuleService* shared_module_service() { |
| 388 return shared_module_service_.get(); | 387 return shared_module_service_.get(); |
| 389 } | 388 } |
| 390 | 389 |
| 391 extensions::ExternalInstallManager* external_install_manager() { | |
| 392 return external_install_manager_.get(); | |
| 393 } | |
| 394 | |
| 395 ////////////////////////////////////////////////////////////////////////////// | 390 ////////////////////////////////////////////////////////////////////////////// |
| 396 // For Testing | 391 // For Testing |
| 397 | 392 |
| 398 // Unload all extensions. Does not send notifications. | 393 // Unload all extensions. Does not send notifications. |
| 399 void UnloadAllExtensionsForTest(); | 394 void UnloadAllExtensionsForTest(); |
| 400 | 395 |
| 401 // Reloads all extensions. Does not notify that extensions are ready. | 396 // Reloads all extensions. Does not notify that extensions are ready. |
| 402 void ReloadExtensionsForTest(); | 397 void ReloadExtensionsForTest(); |
| 403 | 398 |
| 404 // Clear all ExternalProviders. | 399 // Clear all ExternalProviders. |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 std::set<std::string> reloading_extensions_; | 669 std::set<std::string> reloading_extensions_; |
| 675 | 670 |
| 676 // A set of the extension ids currently being terminated. We use this to | 671 // A set of the extension ids currently being terminated. We use this to |
| 677 // avoid trying to unload the same extension twice. | 672 // avoid trying to unload the same extension twice. |
| 678 std::set<std::string> extensions_being_terminated_; | 673 std::set<std::string> extensions_being_terminated_; |
| 679 | 674 |
| 680 // The controller for the UI that alerts the user about any blacklisted | 675 // The controller for the UI that alerts the user about any blacklisted |
| 681 // extensions. | 676 // extensions. |
| 682 scoped_ptr<extensions::ExtensionErrorController> error_controller_; | 677 scoped_ptr<extensions::ExtensionErrorController> error_controller_; |
| 683 | 678 |
| 684 // The manager for extensions that were externally installed that is | |
| 685 // responsible for prompting the user about suspicious extensions. | |
| 686 scoped_ptr<extensions::ExternalInstallManager> external_install_manager_; | |
| 687 | |
| 688 // Sequenced task runner for extension related file operations. | 679 // Sequenced task runner for extension related file operations. |
| 689 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 680 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
| 690 | 681 |
| 691 #if defined(ENABLE_EXTENSIONS) | 682 #if defined(ENABLE_EXTENSIONS) |
| 692 scoped_ptr<extensions::ExtensionActionStorageManager> | 683 scoped_ptr<extensions::ExtensionActionStorageManager> |
| 693 extension_action_storage_manager_; | 684 extension_action_storage_manager_; |
| 694 #endif | 685 #endif |
| 695 scoped_ptr<extensions::ManagementPolicy::Provider> | 686 scoped_ptr<extensions::ManagementPolicy::Provider> |
| 696 shared_module_policy_provider_; | 687 shared_module_policy_provider_; |
| 697 | 688 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 715 GreylistedExtensionDisabled); | 706 GreylistedExtensionDisabled); |
| 716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 707 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 717 GreylistDontEnableManuallyDisabled); | 708 GreylistDontEnableManuallyDisabled); |
| 718 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 709 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 719 GreylistUnknownDontChange); | 710 GreylistUnknownDontChange); |
| 720 | 711 |
| 721 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 712 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 722 }; | 713 }; |
| 723 | 714 |
| 724 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 715 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |