Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Unified Diff: chrome/browser/extensions/extension_service.h

Issue 14973007: Auto-install/uninstall shared module dependencies for extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index d6754a14183b4254d35823293a0741573d3d7d21..6262375b9a5f834fad03e76eab4e0af270101234 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -66,7 +66,7 @@ class ExtensionSystem;
class ExtensionUpdater;
class PendingExtensionManager;
class SettingsFrontend;
-}
+} // namespace extensions
namespace syncer {
class SyncErrorFactory;
@@ -410,6 +410,24 @@ class ExtensionService
virtual void AddComponentExtension(const extensions::Extension* extension)
OVERRIDE;
+ // Checks an extension's shared module imports to see if they are satisfied.
+ // If they are not, this function adds the dependencies to the pending install
+ // list if |extension| came from the webstore. If the import conditions can
+ // never be satisfied (e.g., the importer is not from the web store or the
+ // imported extension is not a shared module), |unrecoverable_error| is set
+ // true.
+ bool CheckImports(const extensions::Extension* extension,
+ bool* unrecoverable_error);
asargent_no_longer_on_chrome 2013/06/13 05:47:16 Huh, it's pretty unusual to see a function returni
elijahtaylor1 2013/06/13 23:32:09 Ok you caught me writing bad code for sure. I wou
+
+ // Returns a set of extensions that import a given extension.
+ scoped_ptr<const ExtensionSet> GetSharedModuleImporters(
asargent_no_longer_on_chrome 2013/06/13 05:47:16 optional naming suggestion: GetDependents / GetDep
elijahtaylor1 2013/06/13 23:32:09 Done.
+ const extensions::Extension* extension);
+
+ // Checks an extension's shared module imports to see if they would still be
+ // referenced by other extensions when a particular extension is uninstalled.
+ // Uninstalls shared modules that are no longer referenced.
asargent_no_longer_on_chrome 2013/06/13 05:47:16 nit: The first sentence in this comment is sort of
elijahtaylor1 2013/06/13 23:32:09 Done.
+ void PruneSharedModulesOnUninstall(const extensions::Extension* extension);
+
// Informs the service that an extension's files are in place for loading.
//
// Please make sure the Blacklist is checked some time before calling this
@@ -420,6 +438,9 @@ class ExtensionService
bool has_requirement_errors,
bool wait_for_idle);
+ // Checks for delayed installation for all pending installs.
+ void MaybeFinishDelayedInstallations();
+
// Similar to FinishInstallation, but first checks if there still is an update
// pending for the extension, and makes sure the extension is still idle.
void MaybeFinishDelayedInstallation(const std::string& extension_id);
@@ -801,13 +822,8 @@ class ExtensionService
// they can easily be un-blacklisted.
ExtensionSet blacklisted_extensions_;
- // The list of extension updates that have had their installs delayed because
- // they are waiting for idle.
- ExtensionSet delayed_updates_for_idle_;
-
- // The list of extension installs delayed by |installs_delayed_|.
- // This is a disjoint set from |delayed_updates_for_idle_|. Extensions in
- // the |delayed_installs_| do not need to wait for idle.
+ // The list of extension installs delayed for various reasons. The reason
+ // for delayed install is stored in ExtensionPrefs.
ExtensionSet delayed_installs_;
// Hold the set of pending extensions.

Powered by Google App Engine
This is Rietveld 408576698