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> |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 417 |
418 // Check if we have preferences for the component extension and, if not or if | 418 // Check if we have preferences for the component extension and, if not or if |
419 // the stored version differs, install the extension (without requirements | 419 // the stored version differs, install the extension (without requirements |
420 // checking) before calling AddExtension. | 420 // checking) before calling AddExtension. |
421 virtual void AddComponentExtension(const extensions::Extension* extension) | 421 virtual void AddComponentExtension(const extensions::Extension* extension) |
422 OVERRIDE; | 422 OVERRIDE; |
423 | 423 |
424 // Launch an extension the next time it is loaded. | 424 // Launch an extension the next time it is loaded. |
425 void ScheduleLaunchOnLoad(const std::string& extension_id); | 425 void ScheduleLaunchOnLoad(const std::string& extension_id); |
426 | 426 |
| 427 // Checks an extension's shared module imports to see if they are satisfied. |
| 428 // If they are not, this function disables the extension, and optionally adds |
| 429 // the dependencies to the pending install list. |
| 430 bool CheckImports(const extensions::Extension* extension); |
| 431 |
| 432 // Checks all extensions for missing imports and syncs them as needed. Also |
| 433 // sets the enable/disable state for extensions based on whether all of their |
| 434 // imports are present. |
| 435 void CheckImportsOnAllExtensions(); |
| 436 |
| 437 // Checks an extension's shared module imports to see if they would still be |
| 438 // referenced by other extensions when a particular extension is uninstalled. |
| 439 // Uninstalls shared modules that are no longer referenced. |
| 440 void PruneSharedModulesOnUninstall(const extensions::Extension* extension); |
| 441 |
427 // Informs the service that an extension's files are in place for loading. | 442 // Informs the service that an extension's files are in place for loading. |
428 // | 443 // |
429 // Please make sure the Blacklist is checked some time before calling this | 444 // Please make sure the Blacklist is checked some time before calling this |
430 // method. | 445 // method. |
431 void OnExtensionInstalled( | 446 void OnExtensionInstalled( |
432 const extensions::Extension* extension, | 447 const extensions::Extension* extension, |
433 const syncer::StringOrdinal& page_ordinal, | 448 const syncer::StringOrdinal& page_ordinal, |
434 bool has_requirement_errors, | 449 bool has_requirement_errors, |
435 bool wait_for_idle); | 450 bool wait_for_idle); |
436 | 451 |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 ObserverList<extensions::UpdateObserver, true> update_observers_; | 1011 ObserverList<extensions::UpdateObserver, true> update_observers_; |
997 | 1012 |
998 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 1013 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
999 InstallAppsWithUnlimtedStorage); | 1014 InstallAppsWithUnlimtedStorage); |
1000 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 1015 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
1001 InstallAppsAndCheckStorageProtection); | 1016 InstallAppsAndCheckStorageProtection); |
1002 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 1017 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
1003 }; | 1018 }; |
1004 | 1019 |
1005 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 1020 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |