Index: chrome/browser/extensions/extension_service.h |
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
index 6aa659d315739e267089c22f799d5fb75d72f95d..77c09e238640a79ded41a7eab2eb94e19c6767c9 100644 |
--- a/chrome/browser/extensions/extension_service.h |
+++ b/chrome/browser/extensions/extension_service.h |
@@ -825,9 +825,17 @@ class ExtensionService |
bool ShouldDelayExtensionUpdate(const std::string& extension_id, |
bool wait_for_idle) const; |
+ // Helper to search remove an storage directories for extensions with |
Charlie Reis
2012/12/05 02:25:40
nit: "search remove an" typo
awong
2012/12/08 01:45:23
Done.
|
+ // isolated storage that have been orphaned by an uninstall. |
+ void GarbageCollectIsolatedStorage(); |
+ void OnGarbageCollectIsolatedStorageFinished(); |
+ |
// extensions::Blacklist::Observer implementation. |
virtual void OnBlacklistUpdated() OVERRIDE; |
+ void set_delay_all_installs(bool value) { delay_all_installs_ = value; } |
Charlie Reis
2012/12/05 02:25:40
Please add a comment to these saying why they're n
awong
2012/12/08 01:45:23
Done.
|
+ bool delay_all_installs() const { return delay_all_installs_; } |
Charlie Reis
2012/12/05 02:25:40
nit: Maybe should_delay_all_installs()?
(It sounds
awong
2012/12/08 01:45:23
How about installs_delayed()? should_delay_all_in
|
+ |
// The normal profile associated with this ExtensionService. |
Profile* profile_; |
@@ -852,6 +860,21 @@ class ExtensionService |
// The list of extension updates that are waiting to be installed. |
ExtensionSet pending_extension_updates_; |
+ // The list of extension installs delayed by |delay_all_installs_|. |
+ struct PendingInstall { |
+ PendingInstall(const extensions::Extension* extension, |
+ const syncer::StringOrdinal& page_ordinal, |
+ bool has_requirement_errors, |
+ bool wait_for_idle); |
+ ~PendingInstall(); |
+ |
+ scoped_refptr<const extensions::Extension> extension; |
+ syncer::StringOrdinal page_ordinal; |
+ bool has_requirement_errors; |
+ bool wait_for_idle; |
+ }; |
+ std::vector<PendingInstall> pending_extension_installs_; |
+ |
// Hold the set of pending extensions. |
extensions::PendingExtensionManager pending_extension_manager_; |
@@ -975,6 +998,12 @@ class ExtensionService |
// decide to abort. |
bool browser_terminating_; |
+ // Set to true to delay all new extension installations. Allows garbage |
+ // collection of on disk state to proceed without worrying about race |
+ // conditions caused by extension installations during the garbage |
+ // collection process. |
+ bool delay_all_installs_; |
+ |
NaClModuleInfoList nacl_module_list_; |
extensions::AppSyncBundle app_sync_bundle_; |