diff options
author | treib <treib@chromium.org> | 2015-08-06 03:55:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-06 10:56:16 +0000 |
commit | 926ee2dccf73a971e1f78e80d09231f8ba19aff3 (patch) | |
tree | 6bfeb8e29cdddb7e765003e6265ef3aba5eb3621 /extensions/shell/browser | |
parent | cac01ee2465f98273202a67a1d1d95ccb381fa90 (diff) | |
download | chromium_src-926ee2dccf73a971e1f78e80d09231f8ba19aff3.zip chromium_src-926ee2dccf73a971e1f78e80d09231f8ba19aff3.tar.gz chromium_src-926ee2dccf73a971e1f78e80d09231f8ba19aff3.tar.bz2 |
Move ownership of AppSorting from ExtensionPrefs to ExtensionSystem
BUG=None
Review URL: https://codereview.chromium.org/1254363004
Cr-Commit-Position: refs/heads/master@{#342093}
Diffstat (limited to 'extensions/shell/browser')
4 files changed, 8 insertions, 15 deletions
diff --git a/extensions/shell/browser/shell_extension_system.cc b/extensions/shell/browser/shell_extension_system.cc index 8e9c30a..7031452 100644 --- a/extensions/shell/browser/shell_extension_system.cc +++ b/extensions/shell/browser/shell_extension_system.cc @@ -18,6 +18,7 @@ #include "extensions/browser/extension_registry.h" #include "extensions/browser/info_map.h" #include "extensions/browser/notification_types.h" +#include "extensions/browser/null_app_sorting.h" #include "extensions/browser/quota_service.h" #include "extensions/browser/runtime_data.h" #include "extensions/common/constants.h" @@ -100,6 +101,7 @@ void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { runtime_data_.reset( new RuntimeData(ExtensionRegistry::Get(browser_context_))); quota_service_.reset(new QuotaService); + app_sorting_.reset(new NullAppSorting); } ExtensionService* ShellExtensionSystem::extension_service() { @@ -136,6 +138,10 @@ QuotaService* ShellExtensionSystem::quota_service() { return quota_service_.get(); } +AppSorting* ShellExtensionSystem::app_sorting() { + return app_sorting_.get(); +} + void ShellExtensionSystem::RegisterExtensionWithRequestContexts( const Extension* extension, const base::Closure& callback) { diff --git a/extensions/shell/browser/shell_extension_system.h b/extensions/shell/browser/shell_extension_system.h index 3fd5d11..29d2982 100644 --- a/extensions/shell/browser/shell_extension_system.h +++ b/extensions/shell/browser/shell_extension_system.h @@ -12,8 +12,6 @@ #include "extensions/browser/extension_system.h" #include "extensions/common/one_shot_event.h" -class BrowserContextKeyedServiceFactory; - namespace base { class FilePath; } @@ -24,11 +22,6 @@ class BrowserContext; namespace extensions { -class InfoMap; -class ProcessManager; -class RendererStartupHelper; -class SharedUserScriptMaster; - // A simplified version of ExtensionSystem for app_shell. Allows // app_shell to skip initialization of services it doesn't need. class ShellExtensionSystem : public ExtensionSystem { @@ -59,6 +52,7 @@ class ShellExtensionSystem : public ExtensionSystem { StateStore* rules_store() override; InfoMap* info_map() override; QuotaService* quota_service() override; + AppSorting* app_sorting() override; void RegisterExtensionWithRequestContexts( const Extension* extension, const base::Closure& callback) override; @@ -80,6 +74,7 @@ class ShellExtensionSystem : public ExtensionSystem { scoped_ptr<RuntimeData> runtime_data_; scoped_ptr<QuotaService> quota_service_; + scoped_ptr<AppSorting> app_sorting_; // Signaled when the extension system has completed its startup tasks. OneShotEvent ready_; diff --git a/extensions/shell/browser/shell_extensions_browser_client.cc b/extensions/shell/browser/shell_extensions_browser_client.cc index 623980f..62b2a5f 100644 --- a/extensions/shell/browser/shell_extensions_browser_client.cc +++ b/extensions/shell/browser/shell_extensions_browser_client.cc @@ -9,7 +9,6 @@ #include "content/public/browser/render_frame_host.h" #include "extensions/browser/api/extensions_api_client.h" #include "extensions/browser/api/generated_api_registration.h" -#include "extensions/browser/app_sorting.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_function_registry.h" #include "extensions/browser/mojo/service_registration.h" @@ -156,11 +155,6 @@ bool ShellExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) { void ShellExtensionsBrowserClient::PermitExternalProtocolHandler() { } -scoped_ptr<AppSorting> ShellExtensionsBrowserClient::CreateAppSorting( - content::BrowserContext* context) { - return scoped_ptr<AppSorting>(new NullAppSorting); -} - bool ShellExtensionsBrowserClient::IsRunningInForcedAppMode() { return false; } diff --git a/extensions/shell/browser/shell_extensions_browser_client.h b/extensions/shell/browser/shell_extensions_browser_client.h index cd79e9d..8b65ccf 100644 --- a/extensions/shell/browser/shell_extensions_browser_client.h +++ b/extensions/shell/browser/shell_extensions_browser_client.h @@ -66,8 +66,6 @@ class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { scoped_ptr<ExtensionHostDelegate> CreateExtensionHostDelegate() override; bool DidVersionUpdate(content::BrowserContext* context) override; void PermitExternalProtocolHandler() override; - scoped_ptr<AppSorting> CreateAppSorting( - content::BrowserContext* context) override; bool IsRunningInForcedAppMode() override; ApiActivityMonitor* GetApiActivityMonitor( content::BrowserContext* context) override; |