Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: extensions/browser/api/api_resource_manager.h

Issue 2863213004: ProcessManagerFactory: fix dependencies in ApiResourceManager, LazyBgndTaskFactory (Closed)
Patch Set: more explanation Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | extensions/browser/browser_context_keyed_api_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/api_resource_manager.h
diff --git a/extensions/browser/api/api_resource_manager.h b/extensions/browser/api/api_resource_manager.h
index 1a9a8d90d97724bd1b0fcc93025bc4b79215d43d..064e7454394c46aa21c37e79ac548c3b8b96faa2 100644
--- a/extensions/browser/api/api_resource_manager.h
+++ b/extensions/browser/api/api_resource_manager.h
@@ -20,8 +20,10 @@
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/extension_registry_factory.h"
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/browser/process_manager.h"
+#include "extensions/browser/process_manager_factory.h"
#include "extensions/browser/process_manager_observer.h"
#include "extensions/common/extension.h"
@@ -365,6 +367,17 @@ class ApiResourceManager : public BrowserContextKeyedAPI,
process_manager_observer_;
};
+template <class T>
+struct BrowserContextFactoryDependencies<ApiResourceManager<T>> {
+ static void DeclareFactoryDependencies(
+ BrowserContextKeyedAPIFactory<ApiResourceManager<T>>* factory) {
+ factory->DependsOn(
+ ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
+ factory->DependsOn(ExtensionRegistryFactory::GetInstance());
+ factory->DependsOn(ProcessManagerFactory::GetInstance());
+ }
+};
+
// With WorkerPoolThreadTraits, ApiResourceManager can be used to manage the
// lifetime of a set of resources that live on sequenced task runner threads
// which ApiFunctions use. Examples of such resources are temporary file
« no previous file with comments | « no previous file | extensions/browser/browser_context_keyed_api_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698