| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/time.h" | 23 #include "base/time.h" |
| 23 #include "base/tuple.h" | 24 #include "base/tuple.h" |
| 24 #include "chrome/browser/extensions/apps_promo.h" | 25 #include "chrome/browser/extensions/apps_promo.h" |
| 25 #include "chrome/browser/extensions/extension_icon_manager.h" | 26 #include "chrome/browser/extensions/extension_icon_manager.h" |
| 26 #include "chrome/browser/extensions/extension_menu_manager.h" | 27 #include "chrome/browser/extensions/extension_menu_manager.h" |
| 27 #include "chrome/browser/extensions/extension_permissions_api.h" | 28 #include "chrome/browser/extensions/extension_permissions_api.h" |
| 28 #include "chrome/browser/extensions/extension_prefs.h" | 29 #include "chrome/browser/extensions/extension_prefs.h" |
| 29 #include "chrome/browser/extensions/extension_process_manager.h" | 30 #include "chrome/browser/extensions/extension_process_manager.h" |
| 30 #include "chrome/browser/extensions/extension_sync_data.h" | 31 #include "chrome/browser/extensions/extension_sync_data.h" |
| 31 #include "chrome/browser/extensions/extension_toolbar_model.h" | 32 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| 32 #include "chrome/browser/extensions/extension_warning_set.h" | 33 #include "chrome/browser/extensions/extension_warning_set.h" |
| 33 #include "chrome/browser/extensions/extensions_quota_service.h" | 34 #include "chrome/browser/extensions/extensions_quota_service.h" |
| 34 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 35 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
| 35 #include "chrome/browser/extensions/pending_extension_manager.h" | 36 #include "chrome/browser/extensions/pending_extension_manager.h" |
| 36 #include "chrome/browser/extensions/process_map.h" | 37 #include "chrome/browser/extensions/process_map.h" |
| 37 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" | 38 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
| 38 #include "chrome/browser/prefs/pref_change_registrar.h" | 39 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 39 #include "chrome/browser/sync/api/sync_change.h" | 40 #include "chrome/browser/sync/api/sync_change.h" |
| 40 #include "chrome/browser/sync/api/syncable_service.h" | 41 #include "chrome/browser/sync/api/syncable_service.h" |
| 41 #include "chrome/common/extensions/extension.h" | 42 #include "chrome/common/extensions/extension.h" |
| 42 #include "chrome/common/extensions/extension_constants.h" | 43 #include "chrome/common/extensions/extension_constants.h" |
| 43 #include "content/common/property_bag.h" | |
| 44 #include "content/public/browser/browser_thread.h" | 44 #include "content/public/browser/browser_thread.h" |
| 45 #include "content/public/browser/notification_observer.h" | 45 #include "content/public/browser/notification_observer.h" |
| 46 #include "content/public/browser/notification_registrar.h" | 46 #include "content/public/browser/notification_registrar.h" |
| 47 | 47 |
| 48 class AppNotificationManager; | 48 class AppNotificationManager; |
| 49 class BookmarkExtensionEventRouter; | 49 class BookmarkExtensionEventRouter; |
| 50 class CrxInstaller; | 50 class CrxInstaller; |
| 51 class ExtensionBrowserEventRouter; | 51 class ExtensionBrowserEventRouter; |
| 52 class ExtensionContentSettingsStore; | 52 class ExtensionContentSettingsStore; |
| 53 class ExtensionCookiesEventRouter; | 53 class ExtensionCookiesEventRouter; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 bool IsBeingUpgraded(const Extension* extension); | 236 bool IsBeingUpgraded(const Extension* extension); |
| 237 void SetBeingUpgraded(const Extension* extension, bool value); | 237 void SetBeingUpgraded(const Extension* extension, bool value); |
| 238 | 238 |
| 239 // Getter and setter for the flag that specifies if the extension has used | 239 // Getter and setter for the flag that specifies if the extension has used |
| 240 // the webrequest API. | 240 // the webrequest API. |
| 241 // TODO(mpcomplete): remove. http://crbug.com/100411 | 241 // TODO(mpcomplete): remove. http://crbug.com/100411 |
| 242 bool HasUsedWebRequest(const Extension* extension); | 242 bool HasUsedWebRequest(const Extension* extension); |
| 243 void SetHasUsedWebRequest(const Extension* extension, bool value); | 243 void SetHasUsedWebRequest(const Extension* extension, bool value); |
| 244 | 244 |
| 245 // Getter for the extension's runtime data PropertyBag. | 245 // Getter for the extension's runtime data PropertyBag. |
| 246 PropertyBag* GetPropertyBag(const Extension* extension); | 246 base::PropertyBag* GetPropertyBag(const Extension* extension); |
| 247 | 247 |
| 248 // Initialize and start all installed extensions. | 248 // Initialize and start all installed extensions. |
| 249 void Init(); | 249 void Init(); |
| 250 | 250 |
| 251 // Initialize the event routers after import has finished. | 251 // Initialize the event routers after import has finished. |
| 252 void InitEventRoutersAfterImport(); | 252 void InitEventRoutersAfterImport(); |
| 253 | 253 |
| 254 // Start up the extension event routers. | 254 // Start up the extension event routers. |
| 255 void InitEventRouters(); | 255 void InitEventRouters(); |
| 256 | 256 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 // True if the background page is ready. | 568 // True if the background page is ready. |
| 569 bool background_page_ready; | 569 bool background_page_ready; |
| 570 | 570 |
| 571 // True while the extension is being upgraded. | 571 // True while the extension is being upgraded. |
| 572 bool being_upgraded; | 572 bool being_upgraded; |
| 573 | 573 |
| 574 // True if the extension has used the webRequest API. | 574 // True if the extension has used the webRequest API. |
| 575 bool has_used_webrequest; | 575 bool has_used_webrequest; |
| 576 | 576 |
| 577 // Generic bag of runtime data that users can associate with extensions. | 577 // Generic bag of runtime data that users can associate with extensions. |
| 578 PropertyBag property_bag; | 578 base::PropertyBag property_bag; |
| 579 | 579 |
| 580 ExtensionRuntimeData(); | 580 ExtensionRuntimeData(); |
| 581 ~ExtensionRuntimeData(); | 581 ~ExtensionRuntimeData(); |
| 582 }; | 582 }; |
| 583 typedef std::map<std::string, ExtensionRuntimeData> ExtensionRuntimeDataMap; | 583 typedef std::map<std::string, ExtensionRuntimeData> ExtensionRuntimeDataMap; |
| 584 | 584 |
| 585 struct NaClModuleInfo { | 585 struct NaClModuleInfo { |
| 586 NaClModuleInfo(); | 586 NaClModuleInfo(); |
| 587 ~NaClModuleInfo(); | 587 ~NaClModuleInfo(); |
| 588 | 588 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 extensions::ProcessMap process_map_; | 803 extensions::ProcessMap process_map_; |
| 804 | 804 |
| 805 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 805 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 806 InstallAppsWithUnlimtedStorage); | 806 InstallAppsWithUnlimtedStorage); |
| 807 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 807 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 808 InstallAppsAndCheckStorageProtection); | 808 InstallAppsAndCheckStorageProtection); |
| 809 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 809 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 810 }; | 810 }; |
| 811 | 811 |
| 812 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 812 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |