summaryrefslogtreecommitdiffstats
path: root/extensions/shell
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/shell')
-rw-r--r--extensions/shell/browser/shell_extension_system.cc9
-rw-r--r--extensions/shell/browser/shell_extension_system.h5
2 files changed, 13 insertions, 1 deletions
diff --git a/extensions/shell/browser/shell_extension_system.cc b/extensions/shell/browser/shell_extension_system.cc
index 2ed9d7b..3fbbf14 100644
--- a/extensions/shell/browser/shell_extension_system.cc
+++ b/extensions/shell/browser/shell_extension_system.cc
@@ -22,6 +22,7 @@
#include "extensions/browser/quota_service.h"
#include "extensions/browser/runtime_data.h"
#include "extensions/browser/service_worker_manager.h"
+#include "extensions/browser/value_store/value_store_factory_impl.h"
#include "extensions/common/constants.h"
#include "extensions/common/file_util.h"
@@ -31,7 +32,9 @@ using content::BrowserThread;
namespace extensions {
ShellExtensionSystem::ShellExtensionSystem(BrowserContext* browser_context)
- : browser_context_(browser_context), weak_factory_(this) {}
+ : browser_context_(browser_context),
+ store_factory_(new ValueStoreFactoryImpl(browser_context->GetPath())),
+ weak_factory_(this) {}
ShellExtensionSystem::~ShellExtensionSystem() {
}
@@ -134,6 +137,10 @@ StateStore* ShellExtensionSystem::rules_store() {
return nullptr;
}
+scoped_refptr<ValueStoreFactory> ShellExtensionSystem::store_factory() {
+ return store_factory_;
+}
+
InfoMap* ShellExtensionSystem::info_map() {
if (!info_map_.get())
info_map_ = new InfoMap;
diff --git a/extensions/shell/browser/shell_extension_system.h b/extensions/shell/browser/shell_extension_system.h
index b84c3fd..4448fb9 100644
--- a/extensions/shell/browser/shell_extension_system.h
+++ b/extensions/shell/browser/shell_extension_system.h
@@ -23,6 +23,8 @@ class BrowserContext;
namespace extensions {
+class ValueStoreFactory;
+
// A simplified version of ExtensionSystem for app_shell. Allows
// app_shell to skip initialization of services it doesn't need.
class ShellExtensionSystem : public ExtensionSystem {
@@ -52,6 +54,7 @@ class ShellExtensionSystem : public ExtensionSystem {
SharedUserScriptMaster* shared_user_script_master() override;
StateStore* state_store() override;
StateStore* rules_store() override;
+ scoped_refptr<ValueStoreFactory> store_factory() override;
InfoMap* info_map() override;
QuotaService* quota_service() override;
AppSorting* app_sorting() override;
@@ -81,6 +84,8 @@ class ShellExtensionSystem : public ExtensionSystem {
scoped_ptr<QuotaService> quota_service_;
scoped_ptr<AppSorting> app_sorting_;
+ scoped_refptr<ValueStoreFactory> store_factory_;
+
// Signaled when the extension system has completed its startup tasks.
OneShotEvent ready_;