| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/prefs/public/pref_change_registrar.h" | 19 #include "base/prefs/public/pref_change_registrar.h" |
| 20 #include "base/string16.h" | 20 #include "base/string16.h" |
| 21 #include "chrome/browser/extensions/app_shortcut_manager.h" | |
| 22 #include "chrome/browser/extensions/app_sync_bundle.h" | 21 #include "chrome/browser/extensions/app_sync_bundle.h" |
| 23 #include "chrome/browser/extensions/blacklist.h" | 22 #include "chrome/browser/extensions/blacklist.h" |
| 24 #include "chrome/browser/extensions/extension_function_histogram_value.h" | 23 #include "chrome/browser/extensions/extension_function_histogram_value.h" |
| 25 #include "chrome/browser/extensions/extension_icon_manager.h" | 24 #include "chrome/browser/extensions/extension_icon_manager.h" |
| 26 #include "chrome/browser/extensions/extension_prefs.h" | 25 #include "chrome/browser/extensions/extension_prefs.h" |
| 27 #include "chrome/browser/extensions/extension_process_manager.h" | 26 #include "chrome/browser/extensions/extension_process_manager.h" |
| 28 #include "chrome/browser/extensions/extension_sync_bundle.h" | 27 #include "chrome/browser/extensions/extension_sync_bundle.h" |
| 29 #include "chrome/browser/extensions/extension_toolbar_model.h" | 28 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| 30 #include "chrome/browser/extensions/extensions_quota_service.h" | 29 #include "chrome/browser/extensions/extensions_quota_service.h" |
| 31 #include "chrome/browser/extensions/external_provider_interface.h" | 30 #include "chrome/browser/extensions/external_provider_interface.h" |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 #if defined(UNIT_TEST) | 674 #if defined(UNIT_TEST) |
| 676 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { | 675 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { |
| 677 TrackTerminatedExtension(extension); | 676 TrackTerminatedExtension(extension); |
| 678 } | 677 } |
| 679 | 678 |
| 680 void FinishInstallationForTest(const extensions::Extension* extension) { | 679 void FinishInstallationForTest(const extensions::Extension* extension) { |
| 681 FinishInstallation(extension); | 680 FinishInstallation(extension); |
| 682 } | 681 } |
| 683 #endif | 682 #endif |
| 684 | 683 |
| 685 extensions::AppShortcutManager* app_shortcut_manager() { | |
| 686 return &app_shortcut_manager_; | |
| 687 } | |
| 688 | |
| 689 // Specialization of syncer::SyncableService::AsWeakPtr. | 684 // Specialization of syncer::SyncableService::AsWeakPtr. |
| 690 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } | 685 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } |
| 691 | 686 |
| 692 bool browser_terminating() const { return browser_terminating_; } | 687 bool browser_terminating() const { return browser_terminating_; } |
| 693 | 688 |
| 694 // For testing. | 689 // For testing. |
| 695 void set_browser_terminating_for_test(bool value) { | 690 void set_browser_terminating_for_test(bool value) { |
| 696 browser_terminating_ = value; | 691 browser_terminating_ = value; |
| 697 } | 692 } |
| 698 | 693 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 // How many extensions were wiped out. | 983 // How many extensions were wiped out. |
| 989 size_t wipeout_count_; | 984 size_t wipeout_count_; |
| 990 | 985 |
| 991 NaClModuleInfoList nacl_module_list_; | 986 NaClModuleInfoList nacl_module_list_; |
| 992 | 987 |
| 993 extensions::AppSyncBundle app_sync_bundle_; | 988 extensions::AppSyncBundle app_sync_bundle_; |
| 994 extensions::ExtensionSyncBundle extension_sync_bundle_; | 989 extensions::ExtensionSyncBundle extension_sync_bundle_; |
| 995 | 990 |
| 996 extensions::ProcessMap process_map_; | 991 extensions::ProcessMap process_map_; |
| 997 | 992 |
| 998 extensions::AppShortcutManager app_shortcut_manager_; | |
| 999 | |
| 1000 scoped_ptr<ExtensionErrorUI> extension_error_ui_; | 993 scoped_ptr<ExtensionErrorUI> extension_error_ui_; |
| 1001 // Sequenced task runner for extension related file operations. | 994 // Sequenced task runner for extension related file operations. |
| 1002 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 995 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
| 1003 | 996 |
| 1004 #if defined(ENABLE_EXTENSIONS) | 997 #if defined(ENABLE_EXTENSIONS) |
| 1005 scoped_ptr<extensions::ExtensionActionStorageManager> | 998 scoped_ptr<extensions::ExtensionActionStorageManager> |
| 1006 extension_action_storage_manager_; | 999 extension_action_storage_manager_; |
| 1007 #endif | 1000 #endif |
| 1008 | 1001 |
| 1009 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 1002 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 1010 InstallAppsWithUnlimtedStorage); | 1003 InstallAppsWithUnlimtedStorage); |
| 1011 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 1004 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 1012 InstallAppsAndCheckStorageProtection); | 1005 InstallAppsAndCheckStorageProtection); |
| 1013 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 1006 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 1014 }; | 1007 }; |
| 1015 | 1008 |
| 1016 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 1009 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |