Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / test_extension_system.h
index 82d7cb3..f8e0b43 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
 
+#include "base/memory/scoped_vector.h"
 #include "extensions/browser/extension_system.h"
 #include "extensions/common/one_shot_event.h"
 
@@ -22,18 +23,20 @@ class BrowserContext;
 }
 
 namespace extensions {
+class DeclarativeUserScriptMaster;
 class ExtensionPrefs;
 class RuntimeData;
+class SharedUserScriptMaster;
 class StandardManagementPolicyProvider;
 
 // Test ExtensionSystem, for use with TestingProfile.
 class TestExtensionSystem : public ExtensionSystem {
  public:
   explicit TestExtensionSystem(Profile* profile);
-  virtual ~TestExtensionSystem();
+  ~TestExtensionSystem() override;
 
   // KeyedService implementation.
-  virtual void Shutdown() OVERRIDE;
+  void Shutdown() override;
 
   // Creates an ExtensionPrefs with the testing profile and returns it.
   // Useful for tests that need to modify prefs before creating the
@@ -48,41 +51,34 @@ class TestExtensionSystem : public ExtensionSystem {
       const base::FilePath& install_directory,
       bool autoupdate_enabled);
 
-  // Creates a ProcessManager. If not invoked, the ProcessManager is NULL.
-  void CreateProcessManager();
-
-  // Allows the ProcessManager to be overriden, for example by a stub
-  // implementation. Takes ownership of |manager|.
-  void SetProcessManager(ProcessManager* manager);
-
   void CreateSocketManager();
 
-  virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE {}
+  void InitForRegularProfile(bool extensions_enabled) override {}
   void SetExtensionService(ExtensionService* service);
-  virtual ExtensionService* extension_service() OVERRIDE;
-  virtual RuntimeData* runtime_data() OVERRIDE;
-  virtual ManagementPolicy* management_policy() OVERRIDE;
-  virtual UserScriptMaster* user_script_master() OVERRIDE;
-  virtual ProcessManager* process_manager() OVERRIDE;
-  virtual StateStore* state_store() OVERRIDE;
-  virtual StateStore* rules_store() OVERRIDE;
+  ExtensionService* extension_service() override;
+  RuntimeData* runtime_data() override;
+  ManagementPolicy* management_policy() override;
+  SharedUserScriptMaster* shared_user_script_master() override;
+  StateStore* state_store() override;
+  StateStore* rules_store() override;
   TestingValueStore* value_store() { return value_store_; }
-  virtual InfoMap* info_map() OVERRIDE;
-  virtual LazyBackgroundTaskQueue* lazy_background_task_queue() OVERRIDE;
+  InfoMap* info_map() override;
+  LazyBackgroundTaskQueue* lazy_background_task_queue() override;
   void SetEventRouter(scoped_ptr<EventRouter> event_router);
-  virtual EventRouter* event_router() OVERRIDE;
-  virtual ExtensionWarningService* warning_service() OVERRIDE;
-  virtual Blacklist* blacklist() OVERRIDE;
-  virtual ErrorConsole* error_console() OVERRIDE;
-  virtual InstallVerifier* install_verifier() OVERRIDE;
-  virtual QuotaService* quota_service() OVERRIDE;
-  virtual const OneShotEvent& ready() const OVERRIDE;
-  virtual ContentVerifier* content_verifier() OVERRIDE;
-
-  void SetReady() {
-    LOG(INFO) << "SetReady()";
-    ready_.Signal();
-  }
+  EventRouter* event_router() override;
+  ErrorConsole* error_console() override;
+  InstallVerifier* install_verifier() override;
+  QuotaService* quota_service() override;
+  const OneShotEvent& ready() const override;
+  ContentVerifier* content_verifier() override;
+  scoped_ptr<ExtensionSet> GetDependentExtensions(
+      const Extension* extension) override;
+  DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByExtension(
+      const ExtensionId& extension_id) override;
+
+  // Note that you probably want to use base::RunLoop().RunUntilIdle() right
+  // after this to run all the accumulated tasks.
+  void SetReady() { ready_.Signal(); }
 
   // Factory method for tests to use with SetTestingProfile.
   static KeyedService* Build(content::BrowserContext* profile);
@@ -94,13 +90,10 @@ class TestExtensionSystem : public ExtensionSystem {
   scoped_ptr<StateStore> state_store_;
   // A pointer to the TestingValueStore owned by |state_store_|.
   TestingValueStore* value_store_;
-  scoped_ptr<Blacklist> blacklist_;
-  scoped_ptr<StandardManagementPolicyProvider>
-      standard_management_policy_provider_;
+  ScopedVector<DeclarativeUserScriptMaster> declarative_user_script_masters_;
   scoped_ptr<ManagementPolicy> management_policy_;
   scoped_ptr<RuntimeData> runtime_data_;
   scoped_ptr<ExtensionService> extension_service_;
-  scoped_ptr<ProcessManager> process_manager_;
   scoped_refptr<InfoMap> info_map_;
   scoped_ptr<EventRouter> event_router_;
   scoped_ptr<ErrorConsole> error_console_;