| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SHARED_MODULE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 ImportStatus CheckImports( | 44 ImportStatus CheckImports( |
| 45 const Extension* extension, | 45 const Extension* extension, |
| 46 std::list<SharedModuleInfo::ImportInfo>* missing_modules, | 46 std::list<SharedModuleInfo::ImportInfo>* missing_modules, |
| 47 std::list<SharedModuleInfo::ImportInfo>* outdated_modules); | 47 std::list<SharedModuleInfo::ImportInfo>* outdated_modules); |
| 48 | 48 |
| 49 // Checks an extension's shared module imports to see if they are satisfied. | 49 // Checks an extension's shared module imports to see if they are satisfied. |
| 50 // If they are not, this function adds the dependencies to the pending install | 50 // If they are not, this function adds the dependencies to the pending install |
| 51 // list if |extension| came from the webstore. | 51 // list if |extension| came from the webstore. |
| 52 ImportStatus SatisfyImports(const Extension* extension); | 52 ImportStatus SatisfyImports(const Extension* extension); |
| 53 | 53 |
| 54 // Returns a set of extensions that import a given extension. |
| 55 scoped_ptr<ExtensionSet> GetDependentExtensions(const Extension* extension); |
| 56 |
| 54 private: | 57 private: |
| 55 // Returns a set of extensions that import a given extension. | |
| 56 scoped_ptr<const ExtensionSet> GetDependentExtensions( | |
| 57 const Extension* extension); | |
| 58 | |
| 59 // ExtensionRegistryObserver implementation. | 58 // ExtensionRegistryObserver implementation. |
| 60 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, | 59 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 61 const Extension* extension) OVERRIDE; | 60 const Extension* extension) OVERRIDE; |
| 62 | 61 |
| 63 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 62 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 64 extension_registry_observer_; | 63 extension_registry_observer_; |
| 65 | 64 |
| 66 // The context associated with this SharedModuleService. | 65 // The context associated with this SharedModuleService. |
| 67 content::BrowserContext* browser_context_; | 66 content::BrowserContext* browser_context_; |
| 68 | 67 |
| 69 DISALLOW_COPY_AND_ASSIGN(SharedModuleService); | 68 DISALLOW_COPY_AND_ASSIGN(SharedModuleService); |
| 70 }; | 69 }; |
| 71 | 70 |
| 72 } // namespace extensions | 71 } // namespace extensions |
| 73 | 72 |
| 74 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ | 73 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ |
| OLD | NEW |