Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / extension_service.h
index 1e389c1..e6c5215 100644 (file)
@@ -30,7 +30,6 @@
 #include "extensions/browser/management_policy.h"
 #include "extensions/browser/pending_extension_manager.h"
 #include "extensions/browser/process_manager.h"
-#include "extensions/browser/quota_service.h"
 #include "extensions/common/extension.h"
 #include "extensions/common/extension_set.h"
 #include "extensions/common/manifest.h"
@@ -79,7 +78,6 @@ class ExtensionServiceInterface
   // DEPRECATED: Use ExtensionRegistry::enabled_extensions() instead.
   // ExtensionRegistry also has the disabled, terminated and blacklisted sets.
   virtual const extensions::ExtensionSet* extensions() const = 0;
-  virtual const extensions::ExtensionSet* disabled_extensions() const = 0;
 
   virtual extensions::PendingExtensionManager* pending_extension_manager() = 0;
 
@@ -169,7 +167,6 @@ class ExtensionService
   // DEPRECATED: Use ExtensionRegistry::enabled_extensions() instead.
   // ExtensionRegistry also has the disabled, terminated and blacklisted sets.
   virtual const extensions::ExtensionSet* extensions() const OVERRIDE;
-  virtual const extensions::ExtensionSet* disabled_extensions() const OVERRIDE;
 
   const extensions::ExtensionSet* delayed_installs() const;
 
@@ -199,12 +196,18 @@ class ExtensionService
   // Initialize and start all installed extensions.
   void Init();
 
-  // Attempts to verify all extensions using the InstallVerifier.
-  void VerifyAllExtensions();
+  // See if we need to bootstrap the install verifier.
+  void MaybeBootstrapVerifier();
+
+  // Attempts to verify all extensions using the InstallVerifier. The
+  // |bootstrap| parameter indicates whether we're doing this because the
+  // InstallVerifier needed to be bootstrapped (otherwise it's for another
+  // reason, e.g. extension install/uninstall).
+  void VerifyAllExtensions(bool bootstrap);
 
   // Once the verifier work is finished, we may want to re-check management
   // policy if |success| indicates the verifier got a new signature back.
-  void FinishVerifyAllExtensions(bool success);
+  void FinishVerifyAllExtensions(bool bootstrap, bool success);
 
   // Called when the associated Profile is going to be destroyed.
   void Shutdown();
@@ -441,8 +444,6 @@ class ExtensionService
   // Note that this may return NULL if autoupdate is not turned on.
   extensions::ExtensionUpdater* updater();
 
-  extensions::QuotaService* quota_service() { return &quota_service_; }
-
   // Sets the name, id and icon resource path of the given extension into the
   // returned dictionary. Returns an empty dictionary if the given extension id
   // is not found.
@@ -747,9 +748,6 @@ class ExtensionService
   // idle.
   bool install_updates_when_idle_;
 
-  // Used by dispatchers to limit API quota for individual extensions.
-  extensions::QuotaService quota_service_;
-
   // Signaled when all extensions are loaded.
   extensions::OneShotEvent* const ready_;
 
@@ -814,6 +812,10 @@ class ExtensionService
   // avoid showing a "new install" notice for an extension reinstall.
   std::set<std::string> extensions_being_reloaded_;
 
+  // A set of the extension ids currently being terminated. We use this to
+  // avoid trying to unload the same extension twice.
+  std::set<std::string> extensions_being_terminated_;
+
   scoped_ptr<ExtensionErrorUI> extension_error_ui_;
   // Sequenced task runner for extension related file operations.
   scoped_refptr<base::SequencedTaskRunner> file_task_runner_;