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> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/file_path.h" | 17 #include "base/file_path.h" |
18 #include "base/gtest_prod_util.h" | 18 #include "base/gtest_prod_util.h" |
19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
22 #include "base/property_bag.h" | 22 #include "base/property_bag.h" |
23 #include "base/string16.h" | 23 #include "base/string16.h" |
24 #include "base/time.h" | 24 #include "base/time.h" |
25 #include "base/tuple.h" | 25 #include "base/tuple.h" |
26 #include "chrome/browser/extensions/api/api_resource_controller.h" | 26 #include "chrome/browser/extensions/api/api_resource_controller.h" |
27 #include "chrome/browser/extensions/app_shortcut_manager.h" | 27 #include "chrome/browser/extensions/app_shortcut_manager.h" |
28 #include "chrome/browser/extensions/app_sync_bundle.h" | 28 #include "chrome/browser/extensions/app_sync_bundle.h" |
29 #include "chrome/browser/extensions/apps_promo.h" | 29 #include "chrome/browser/extensions/apps_promo.h" |
30 #include "chrome/browser/extensions/extension_garbage_collector.h" | |
30 #include "chrome/browser/extensions/extension_icon_manager.h" | 31 #include "chrome/browser/extensions/extension_icon_manager.h" |
31 #include "chrome/browser/extensions/extension_menu_manager.h" | 32 #include "chrome/browser/extensions/extension_menu_manager.h" |
32 #include "chrome/browser/extensions/extension_prefs.h" | 33 #include "chrome/browser/extensions/extension_prefs.h" |
33 #include "chrome/browser/extensions/extension_process_manager.h" | 34 #include "chrome/browser/extensions/extension_process_manager.h" |
34 #include "chrome/browser/extensions/extension_sync_bundle.h" | 35 #include "chrome/browser/extensions/extension_sync_bundle.h" |
35 #include "chrome/browser/extensions/extension_toolbar_model.h" | 36 #include "chrome/browser/extensions/extension_toolbar_model.h" |
36 #include "chrome/browser/extensions/extension_warning_set.h" | 37 #include "chrome/browser/extensions/extension_warning_set.h" |
37 #include "chrome/browser/extensions/extensions_quota_service.h" | 38 #include "chrome/browser/extensions/extensions_quota_service.h" |
38 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 39 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
39 #include "chrome/browser/extensions/pending_extension_manager.h" | 40 #include "chrome/browser/extensions/pending_extension_manager.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
478 // Whether the extension service is ready. | 479 // Whether the extension service is ready. |
479 virtual bool is_ready() OVERRIDE; | 480 virtual bool is_ready() OVERRIDE; |
480 | 481 |
481 extensions::ComponentLoader* component_loader() { | 482 extensions::ComponentLoader* component_loader() { |
482 return component_loader_.get(); | 483 return component_loader_.get(); |
483 } | 484 } |
484 | 485 |
485 // Note that this may return NULL if autoupdate is not turned on. | 486 // Note that this may return NULL if autoupdate is not turned on. |
486 extensions::ExtensionUpdater* updater(); | 487 extensions::ExtensionUpdater* updater(); |
487 | 488 |
489 extensions::ExtensionGarbageCollector* extension_garbage_collector() { | |
Yoyo Zhou
2012/06/14 22:34:09
You don't need an accessor if it's not used outsid
Devlin
2012/06/14 22:51:35
Done.
| |
490 return extension_garbage_collector_.get(); | |
491 } | |
492 | |
488 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } | 493 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } |
489 | 494 |
490 ExtensionsQuotaService* quota_service() { return "a_service_; } | 495 ExtensionsQuotaService* quota_service() { return "a_service_; } |
491 | 496 |
492 ExtensionMenuManager* menu_manager() { return &menu_manager_; } | 497 ExtensionMenuManager* menu_manager() { return &menu_manager_; } |
493 | 498 |
494 AppNotificationManager* app_notification_manager() { | 499 AppNotificationManager* app_notification_manager() { |
495 return app_notification_manager_.get(); | 500 return app_notification_manager_.get(); |
496 } | 501 } |
497 | 502 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
700 | 705 |
701 // The normal profile associated with this ExtensionService. | 706 // The normal profile associated with this ExtensionService. |
702 Profile* profile_; | 707 Profile* profile_; |
703 | 708 |
704 // The ExtensionSystem for the profile above. | 709 // The ExtensionSystem for the profile above. |
705 ExtensionSystem* system_; | 710 ExtensionSystem* system_; |
706 | 711 |
707 // Preferences for the owning profile (weak reference). | 712 // Preferences for the owning profile (weak reference). |
708 ExtensionPrefs* extension_prefs_; | 713 ExtensionPrefs* extension_prefs_; |
709 | 714 |
715 // The ExtensionGarbageCollector associated with this service; this is | |
716 // responsible for cleaning up old or partially deleted extensions. | |
717 scoped_ptr<extensions::ExtensionGarbageCollector> | |
718 extension_garbage_collector_; | |
719 | |
710 // Settings for the owning profile. | 720 // Settings for the owning profile. |
711 scoped_ptr<extensions::SettingsFrontend> settings_frontend_; | 721 scoped_ptr<extensions::SettingsFrontend> settings_frontend_; |
712 | 722 |
713 // The current list of installed extensions. | 723 // The current list of installed extensions. |
714 ExtensionSet extensions_; | 724 ExtensionSet extensions_; |
715 | 725 |
716 // The list of installed extensions that have been disabled. | 726 // The list of installed extensions that have been disabled. |
717 ExtensionSet disabled_extensions_; | 727 ExtensionSet disabled_extensions_; |
718 | 728 |
719 // The list of installed extensions that have been terminated. | 729 // The list of installed extensions that have been terminated. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
847 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 857 scoped_ptr<ExtensionGlobalError> extension_global_error_; |
848 | 858 |
849 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 859 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
850 InstallAppsWithUnlimtedStorage); | 860 InstallAppsWithUnlimtedStorage); |
851 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 861 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
852 InstallAppsAndCheckStorageProtection); | 862 InstallAppsAndCheckStorageProtection); |
853 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 863 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
854 }; | 864 }; |
855 | 865 |
856 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 866 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |