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

Unified Diff: extensions/browser/process_manager_factory.h

Issue 671763002: Extract ProcessManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 2 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 | « extensions/browser/process_manager.cc ('k') | extensions/browser/process_manager_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager_factory.h
diff --git a/extensions/browser/process_manager_factory.h b/extensions/browser/process_manager_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..0e045001bbcb84a7a4db0a5c4722c20a39424aea
--- /dev/null
+++ b/extensions/browser/process_manager_factory.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_BROWSER_PROCESS_MANAGER_FACTORY_H_
+#define EXTENSIONS_BROWSER_PROCESS_MANAGER_FACTORY_H_
+
+#include "base/memory/singleton.h"
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+
+namespace extensions {
+
+class ProcessManager;
+
+class ProcessManagerFactory : public BrowserContextKeyedServiceFactory {
+ public:
+ static ProcessManager* GetForBrowserContext(content::BrowserContext* context);
+ // Returns NULL if there is no ProcessManager associated with this context.
+ static ProcessManager* GetForBrowserContextIfExists(
+ content::BrowserContext* context);
+ static ProcessManagerFactory* GetInstance();
+
+ private:
+ friend struct DefaultSingletonTraits<ProcessManagerFactory>;
+
+ ProcessManagerFactory();
+ virtual ~ProcessManagerFactory();
+
+ // BrowserContextKeyedServiceFactory
+ virtual KeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* context) const override;
+ virtual content::BrowserContext* GetBrowserContextToUse(
+ content::BrowserContext* context) const override;
+
+ DISALLOW_COPY_AND_ASSIGN(ProcessManagerFactory);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_FACTORY_H_
« no previous file with comments | « extensions/browser/process_manager.cc ('k') | extensions/browser/process_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698